Hide Macro excel 2007, run with a button only [Closed]

Report
-
Posts
261
Registration date
Saturday April 11, 2009
Status
Member
Last seen
June 21, 2011
-
Hello,
I am using excel 2007 and I wish to stop users runing macros except via macro objects in work sheets. Ie so other users can't access the macro via the macro run button in the ribbon

I know how to hide all macro related buttons, except the run button.

Can one hide the run button as well as all the other macro buttons?, or if I make the macro private then they are unabled to be called from a worksheet macro button.

Either way should work

I don't want users to run a macro on the wrong sheets, but the macro can be called to run from many sheets but not all (ie 16 out 20 sheets are ok) but will do damge to the sheet if they are run on the other 4 sheets

Thank you 4 your help

cheers
Deak

1 reply

Posts
261
Registration date
Saturday April 11, 2009
Status
Member
Last seen
June 21, 2011
307
Check the activesheet in the macro and if the activesheet is not a permitted sheet use "exit sub"
2
Thank you

A few words of thanks would be greatly appreciated. Add comment

CCM 2942 users have said thank you to us this month

Subscribe To Our Newsletter!

The Best of CCM in Your Inbox

Subscribe To Our Newsletter!