Any suggestions?
I am needing to turn off the PW protection on a worksheet before I do a copy.
I have the same code for other sheets and it works fine. For some reason on this sheet
if I have it pass protected with "mypw" and run the macro below I get a runtime error of 1004 (password supplied is incorrect). I can go into Tools, Protection, Unprotect sheet and type in the same PW without any problems. I can change the unprotect to Protect and it will set it, I just cant remove it when I do my copy
????
Sub test1()
Turn off PW on Sales Sheet
ActiveSheet.Unprotect Password:=mypw
End Sub
I am needing to turn off the PW protection on a worksheet before I do a copy.
I have the same code for other sheets and it works fine. For some reason on this sheet
if I have it pass protected with "mypw" and run the macro below I get a runtime error of 1004 (password supplied is incorrect). I can go into Tools, Protection, Unprotect sheet and type in the same PW without any problems. I can change the unprotect to Protect and it will set it, I just cant remove it when I do my copy
????
Sub test1()
Turn off PW on Sales Sheet
ActiveSheet.Unprotect Password:=mypw
End Sub