Protect sheet password not removing

JamesU

New Member
Joined
Feb 7, 2019
Messages
2
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
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Post a pic of your code window, please.
I'm trying to help you but I'm not getting what's your ask clearly.
 
Upvote 0

Forum statistics

Threads
1,206,762
Messages
6,074,788
Members
446,089
Latest member
Andrew123456789

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top