Macro Secret Key Code/

  • Thread starter Thread starter CLR
  • Start date Start date
C

CLR

Hi All.............

Is it possible to put a small statement at the beginning of selected Macros,
that would prevent them from working unless a specific passcode number was
previously typed into a specific cell? I have many Macros set up on
push-buttons but would like to prevent "casual" users and data-entry people
from using them......but still allow certain macros without this feature to
be used by everyone.

TIA
Vaya con Dios,
Chuck, CABGx3
 
at the beginning of each macro:
If Sheets("Whatever").Range("E3").Value<>"xyz" then exit sub

pick a sheet & a range & a "password", make the change in the above
statement & you're all set.

Bob Umlas
Excel MVP
 
Very nice Bob...........EXACTLY what I was looking for..........

Thank you very kindly...........

Vaya con Dios,
Chuck, CABGx3
 
You will also need a way for each user to enter the password in Rng E2 ?? on
Workbook_Open so that it is not hard coded.

Likewise the Workbook_Before_Close event needs to empty E2 for the same
reason.
 
Thanks for the response gocush...........the "Workbook_Before_Close" point
is a good one.........I was depending on the Certified Operator to remember
to delete the Passcode and thats for sure not a good idea.........thanks for
reminding me

As for your first point, I don't think I understand what you mean
there..........I had intended that the CO hand-type the Passcode into the
selected cell......

Vaya con Dios,
Chuck, CABGx3
 

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

Similar Threads


Back
Top