Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help on Macro
Good morning. A couple of weeks ago, someone from this forum, was very
helpful in my question on how to unprotect protected worksheets, with similar passwords, with a macro. Below is a copy of the VB script I was given. It worked but then I realized, the password "hi" is now visible under the macro script. Is there a way to rewrite the code so that it will not show the password and instead when the macro is run, one has to enter the password before the macro can unprotect the protected worksheets? thank you very much, Storm Option Explicit sub testme() dim myPWD as string dim wks as worksheet myPWD = "hi" for each wks in activeworkbook.worksheets wks.unprotect password:=mypwd next wks end sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro recorded... tabs & file names changed, macro hangs | Excel Worksheet Functions | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions | |||
how to count/sum by function/macro to get the number of record to do copy/paste in macro | Excel Programming | |||
macro to delete entire rows when column A is blank ...a quick macro | Excel Programming | |||
Start Macro / Stop Macro / Restart Macro | Excel Programming |