Can Not Unprotect Workbook

Evagrius Ponticus

Well-known Member
Joined
May 24, 2007
Messages
1,467
Hi all,

I have a workbook with a large amount of code. It has been working fine for several months. I opened it today and I was greeted with a vba error of "method unprotect object worksheet failed."

I of course tried to unlock the worksheet but the "unprotect sheet" function is grayed out! I went in the vbe and I get "project is unviewable". Can anyone advise?
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
i wish I could tell you what was wrong. That sounds really frustrating.

I was encounter a "Catastrophic failure" message a couple nights ago that required me to recreate my entire workbook (userforms and all), copy and paste the code back into new modules and save over the old version. Some kind of corruption issue. Hopefully yours doesn't turn out that way, but just be aware that as long as you've got the code stored somewhere that should at least be an option. Just copy any sheets you want from the old workbook and recreate all the modules in an entirely new workbook.
 
Upvote 0
Wow Smitty - I owe you a chilled beverage of your choice. That's exactly what happened. Smitty, is there some way I can prevent this in VBA?

Thanks for the sympathy Glory - that has actually happened to me before. I was playing around with the "signature" feature of Excel and destroyed the workbook!
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,291
Members
452,902
Latest member
Knuddeluff

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