Hide Macro excel 2007, run with a button only

Closed
deak - Aug 20, 2009 at 08:40 PM
Excelguru Posts 261 Registration date Saturday April 11, 2009 Status Member Last seen June 21, 2011 - Aug 21, 2009 at 06:46 AM
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
Related:

1 response

Excelguru Posts 261 Registration date Saturday April 11, 2009 Status Member Last seen June 21, 2011 307
Aug 21, 2009 at 06:46 AM
Check the activesheet in the macro and if the activesheet is not a permitted sheet use "exit sub"
2