Restricting Macros

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a program that uses VBA modules and macros. I've password protected
the VBA. How do I restrict the running of the macros from the Tools, Macros
menu? Edit and Delete are restricted but not Run. Thank you.
 
Ed said:
I have a program that uses VBA modules and macros. I've password protected
the VBA. How do I restrict the running of the macros from the Tools, Macros
menu? Edit and Delete are restricted but not Run. Thank you.

Have you tried the Application.Caller method? It should tell you how the
macro was called. I guess it should be possible to figure out whether it was
was called from the Tools|Macros menu item.

/Fredrik
 
Add this to the module at the start

Option Private Module

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
This fixed the problem; thank you.

Bob Phillips said:
Add this to the module at the start

Option Private Module

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
I needed to use Option Private Module. But your reply introduced another
method to me; thank you.
 

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