How do I make all VBA routines offlimits until a user enters the correct password

  • Thread starter Thread starter Kevin H. Stecyk
  • Start date Start date
K

Kevin H. Stecyk

Hi,

I want to put VBA routines into a workbook. But I want these routines
off-limits until a qualified user provides the correct password. Is there
an easy to accomplish this?

Thank you.

Regards,
Kevin
 
It would all depend upon how the routines are accessed.
If by menu, don't build the menu.
If from the macro list, maybe use a global variable that is checked in each
routine and if not set exits immediately.
Or maybe some other way, depending on the answer to my question.

But be aware that none of this is foolproof as Excel security is not very
resilient.
 
Subject to the limitations that Bob has outlined, one way would be to make
all the routines Private so that they cannot be accessed via the menu and
then provide a button that they can press that prompts them for a password
and then upon successful completion throws up a form with buttons for
whatever routines you want to run.
 
Ken & Bob,

Thank you very much for your responses. You've answered my question.

Best regards,
Kevin
 

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