Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() alan_stew wrote: Dave...In your code you are looping through the worksheets, but 'ActiveSheet' keeps referring to whatever sheet is active when the code starts running, unless you change that. The easiest fix would seem to me to be to change "ActiveSheet" in the code below to "ws". My guess is that's all you need to do the trick. Alan Doh! Thanks, Alan, that did the trick! For Each ws In ActiveWorkbook.Worksheets If ws.Name Like "*Monthly" Then ActiveSheet.Unprotect Password:=sPWORD1 <---- Password not correct ActiveSheet.Protect Password:=sPWORD2 End If Next Any ideas on what I'm missing? Thanks. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
changing password | Excel Discussion (Misc queries) | |||
changing password to **** | Excel Programming | |||
Restrict users from changing password | Excel Discussion (Misc queries) | |||
Changing password protection on sheets | Excel Discussion (Misc queries) | |||
Changing a made up password | Excel Programming |