Hello,
I have set passwords for some codes to run and declared like this:
Const formprotect = "pass"
Const Clerkpw = "clerk"
How can I reference sheet 'Search'! cell D14 for "pass" and cell D15 for "clerk" ?
Thanks,
Fred
Hello,
I have set passwords for some codes to run and declared like this:
Const formprotect = "pass"
Const Clerkpw = "clerk"
How can I reference sheet 'Search'! cell D14 for "pass" and cell D15 for "clerk" ?
Thanks,
Fred
Try:
Please Login or Register to view this content.
Trevor Shuttleworth - Retired Excel/VBA Consultant
I dream of a better world where chickens can cross the road without having their motives questioned
'Being unapologetic means never having to say you're sorry' John Cooper Clarke
I think I figured it out:
Const formprotect = Trim(Sheets("Search").Range("D14").Value)
Const Clerkpw = Trim(Sheets("Search").Range("D15").Value)
Oh I didn't see your reply TMS which is better?
I tried both but get errors can you try it please? I have the attached without any changes to code.
Isn't this like having a password that will apply to all codes?
I see this, and many of your other threads are marked solved, although I'm not sure we reached a conclusion for this one.
For closure, if only mine, here is the way I think it could/should be done.
Declare the Global Variables at the start of ModPWSecurity standard module
Then, in the Workbook module, change the Workbook_Open event handler:Please Login or Register to view this content.
Please Login or Register to view this content.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks