Password Oddity

S

SamuelT

Hi all,

So I've got some code (helped by some of you forumeers) tha
unprotects, filters, then reprotects the sheet. This has worked fine
but now when I go to manually unprotect a sheet, Excel tells me this i
the wrong password. I checked and rechecked the code and the password i
definitely right. I've pasted it below - and ideas what's going on?

Sub SL()
Sheets("Programme (2 Week)").Select
ActiveSheet.Unprotect Password:="donottouch"
Selection.AutoFilter Field:=9, Criteria1:="Steve Lomax"
ActiveSheet.Protect DrawingObjects:=True, Contents:=True
Scenarios:=True, Password:="donotouch"
Sheets("Programme (High Level)").Select
ActiveSheet.Unprotect Password:="donottouch"
Selection.AutoFilter Field:=9, Criteria1:="Steve Lomax"
ActiveSheet.Protect DrawingObjects:=True, Contents:=True
Scenarios:=True, Password:="donotouch"
Sheets("Capacity").Select
ActiveSheet.Unprotect Password:="donottouch"
Selection.AutoFilter Field:=5, Criteria1:="Steve Lomax"
ActiveSheet.Protect DrawingObjects:=True, Contents:=True
Scenarios:=True, Password:="donotouch"
Sheets("Components").Select
ActiveSheet.Unprotect Password:="donottouch"
Selection.AutoFilter Field:=3, Criteria1:="Steve Lomax"
ActiveSheet.Protect DrawingObjects:=True, Contents:=True
Scenarios:=True, Password:="donotouch"
Sheets("Billing").Select
ActiveSheet.Unprotect Password:="donottouch"
ActiveWindow.ScrollColumn = 1
Selection.AutoFilter Field:=3, Criteria1:="Steve Lomax"
ActiveSheet.Protect DrawingObjects:=True, Contents:=True
Scenarios:=True, Password:="donotouch"
ActiveWindow.ScrollWorkbookTabs Position:=xlLast
Sheets("Extra Fees Calculator").Select
ActiveSheet.Unprotect Password:="donottouch"
Selection.AutoFilter Field:=3, Criteria1:="Steve Lomax"
ActiveSheet.Protect DrawingObjects:=True, Contents:=True
Scenarios:=True, Password:="donotouch"
ActiveWindow.ScrollWorkbookTabs Position:=xlFirst
Sheets("Programme (2 Week)").Select
End Su
 

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

Top