PC Review


Reply
Thread Tools Rate Thread

CommandButton Enable not working in Excel 2007

 
 
jfruiperez@gmail.com
Guest
Posts: n/a
 
      10th Jun 2008
I had an Excel spreadsheet with some buttons, that enabled or disabled
through the VBA function Worksheet_Change depending on the value of
certain cells.
If the cell A contains value 1,
CommandButton.Enabled=True,
CommandButton.Enabled=False.
If the cell A contains value 0,
CommandButton.Enabled=False,
CommandButton.Enabled=True.

It worked perfectly in Excel 2003, but after "upgrading" to Excel
2007, the .Enable property of the CommandButtons can't be changed. I
have exceuted the code line by line inspecting the value change of the
enabled property, and it simply doesn't change when should.

What's the matter with Excel 2007 and the .Enabled property?
 
Reply With Quote
 
 
 
 
Norman Jones
Guest
Posts: n/a
 
      10th Jun 2008
Hi J,

I have no problem in conditionally setting
the Enabled property of a CommandButton
with Excel 2007. e.g.:

Me.CommandButton1.Enabled = Range("a1").Value > 10

Rather than pseudo code, try pasting the
problematic code for consideration.

]

---
Regards.
Norman

<(E-Mail Removed)> wrote in message
news:6d243d11-8b54-4557-adfa-(E-Mail Removed)...
>I had an Excel spreadsheet with some buttons, that enabled or disabled
> through the VBA function Worksheet_Change depending on the value of
> certain cells.
> If the cell A contains value 1,
> CommandButton.Enabled=True,
> CommandButton.Enabled=False.
> If the cell A contains value 0,
> CommandButton.Enabled=False,
> CommandButton.Enabled=True.
>
> It worked perfectly in Excel 2003, but after "upgrading" to Excel
> 2007, the .Enable property of the CommandButtons can't be changed. I
> have exceuted the code line by line inspecting the value change of the
> enabled property, and it simply doesn't change when should.
>
> What's the matter with Excel 2007 and the .Enabled property?


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2007 enable macro's Just Merks Microsoft Excel Discussion 1 3rd Jul 2011 11:52 PM
How do i enable all 1,00,000+ rows in excel 2007 free_ur_mind Microsoft Excel Misc 2 12th Apr 2010 03:50 PM
How do I enable macro use in excel 2007 Tith Microsoft Excel Misc 2 11th May 2009 05:27 PM
How to enable Macros in excel 2007 ss Microsoft Excel Misc 1 21st Jan 2008 09:39 PM
Commandbutton enable/disabling Pat Microsoft Excel Programming 6 4th May 2005 08:56 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:05 PM.