Link to home
Start Free TrialLog in
Avatar of Mosher1
Mosher1

asked on

Lock Form Button

Is it possible with a passworded excel worksheet to prevent form buttons with assigned macros (as distinct from command buttons), from being activated. Furthermore can you actually hide form buttons?

Thanks.

Mosher1
Avatar of clarkscott
clarkscott
Flag of United States of America image

I'm not sure what distinction there is between 'form' buttons and command buttons.
Buttons (you click) on a form are command buttons.
Yes, - VISIBLE = FALSE
In code...
me.cmdYourCommandButton.visible = false     (or    = true)  set inside condition testing code.
You also have the ENABLED property (button is displayed but grayed out)
Scott C
Avatar of Mosher1
Mosher1

ASKER

Hi Clark

Form buttons, as selected by the forms toolbar, are being used to fire macros assigned to them.

As distinct from command buttons, from the commands toolbar, which have the code directly behind them, for want of a better term.

The former can be 'locked' but I think this is only from an editing point of view. I'm wondering whether I can make these buttons inactive without coding. In the same way as making a cell unselectable under password,, I thought the program would siimply allow this with a button.

Regards

Mosher1

ASKER CERTIFIED SOLUTION
Avatar of clarkscott
clarkscott
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Mosher1

ASKER

In the absence of further comment it seems that this function is not available, and your suggestion may be the alternative.

Thanks

Mosher1