disable user running macro from Tools > Macro

  • Thread starter Thread starter Steve Simons
  • Start date Start date
S

Steve Simons

Help please . . .

I have a macro that I've assigned to a button on a worksheet. I've
protected the VBA code and I only want the users to be able to run the
macro from my button.

How do I disable the user from running the macro from Tools > Macro?

TIA

Steve
 
Application.Commandbars("Worksheet Menu
Bar").Controls("Tools").Controls("Macro").Enabled=False


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
Placing the word "Private" before the Sub MacroName in the Code Window
Will eliminate the MacroName from showing up in the Tools, Macro
Window..
I think...
Just Another thought
Jim
 
Hi Jim,

Thanks for that also - it works a treat. Both solutions are nice to
know.

Steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top