View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Will Finkle Will Finkle is offline
external usenet poster
 
Posts: 12
Default Disabling a forms 1.0 button

Hi, OssieMac,

Thank you for the suggestion. I had noticed the visible property, but I
think that would look in my UI, if the buttons were not visible... although,
since they get enabled as the user performs Step1, then Step2, etc... it
might not be so bad. . . I'll check it out.

Thanks again,

"OssieMac" wrote:

Hi Will,

I had problems posting this the first time so there is a possibility you
will get it twice.

What about hiding the button after disabling it?

Sheet1.Shapes.Item(strButton).OLEFormat.Object.Vis ible = msoFalse

of course msoTrue unhides it.

Regards,

OssieMac

"Will Finkle" wrote:

Hi,

On recommendation from a textbook I was reading, I used Forms 1.0 toolbar
buttons to run macros, instead of using CommandButtons from the Controls
toolbar -- a decision I am now regretting. . . Anyway, I am using the
following code to temporarily disable buttons created from the Forms toolbar:

Sheet1.Shapes.Item(strButton).OLEFormat.Object.Ena bled = False

and this does disable the button from calling its OnAction macro. But the
button still appears the same, i.e. the text is not greyed out, and when you
move the mouse over the button, the pointer icon still turns into the "hand".
It is confusing to users, so I would like to make the button's appearance
reflect its current state.

Is there a way to modify the appearance or behavior for this type of button,
other than changing its Visible property to False?

Thank you kindly,