Hello,
I placed a password on the vba project and a different password on the first sheet in my excel workbook.
I also have the code
Private Sub Workbook_Open()
Sheets("firstsheet").Protect "season12", UserInterFaceOnly:=True
in the firstsheet vba section. (no the above isn't the actual password if you are wondering
I tried to change this firstsheet password, both by commenting the above line (then closing, reopening workbook) and also tried click unprotect sheet and then reprotect it with a new password.
However now, I frequently get a runtime error 1004 password is incorrect message, it happens either when I open the workbook, or, once I tried saving it a few times unprotecting sheet, now it gives me that error message when I try to run any macro.
I cannot seem to change the firstsheet password without this error message continuing to appear, either upon workbook opening or running any macro within that workbook.
Would anyone please tell me why possibly this happens. I really don't want to have to remove and copy/paste all macro code, userforms and sheets onto a new workbook. (and even then, that might not fix it)
Thankyou,
JamesU
I placed a password on the vba project and a different password on the first sheet in my excel workbook.
I also have the code
Private Sub Workbook_Open()
Sheets("firstsheet").Protect "season12", UserInterFaceOnly:=True
in the firstsheet vba section. (no the above isn't the actual password if you are wondering
I tried to change this firstsheet password, both by commenting the above line (then closing, reopening workbook) and also tried click unprotect sheet and then reprotect it with a new password.
However now, I frequently get a runtime error 1004 password is incorrect message, it happens either when I open the workbook, or, once I tried saving it a few times unprotecting sheet, now it gives me that error message when I try to run any macro.
I cannot seem to change the firstsheet password without this error message continuing to appear, either upon workbook opening or running any macro within that workbook.
Would anyone please tell me why possibly this happens. I really don't want to have to remove and copy/paste all macro code, userforms and sheets onto a new workbook. (and even then, that might not fix it)
Thankyou,
JamesU