CommandButton Enable not working in Excel 2007

J

jfruiperez

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?
 
N

Norman Jones

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.

]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top