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