How to unprotect the excel sheet if forgot the password

Copper Contributor

Hi team need support to unprotect my sheet which is password protected and forgot the password

 

297 Replies

@NikolinoDE hi there i saw your bit about the above but i cant seem to see the code one is to copy then run micros would you be able to DM or email me screen shots or a tutorial video  this is where i am at

platypuss_0-1706221211965.png

 

may i have that code please email address removed for privacy reasons
I followed the instructions in the video I'm listing and it worked perfectly. Office 2021- Windows 11-
Windows default Zip programs
https://www.youtube.com/watch?v=2x23vZIRYRs

@NikolinoDE I don't see any on the right of the while pressing ALT+F11 and double click one the workbook!

Thanks

@NikolinoDE 

I got this error when I ran the code

JTPHX_0-1707518660672.png

 

Delete the underscore at the end of the red line.

@Eviee1265 

 

Code does work and works well. Just make sure the .Unprotect call is all in one line as below...

 

" .Unprotect Chr(i) & Chr(j) & Chr(k) & Chr(l) & Chr(m) & Chr(n) & Chr(o) & Chr(p) & Chr(q) & Chr(r) & Chr(s) & Chr(t)"

 

If it wraps to next line you will get the error that you mention.

@NikolinoDE 

 

Hello NikolinoDE,

 

For some reason everytime I run the macro excel hangs.  Would you mind trying to unprotect my document?

When copying, the easiest way is to simply copy all columns starting with column A in the protected worksheet. Then paste the columns into the new, empty worksheet also starting with column A. Using the method to copy all columns assures that nothing is missed or pasted into the wrong place. The new worksheet will then be an exact duplicate of the protected worksheet but without the protection.

@NikolinoDE how to use this code?? where do I copy paste this code so as to run it?? in ie or chrome or where??

@MargaretMP The problem is if any other sheets in the workbook link to the old sheet, once you delete it the dependent formulae will return #REF errors.

@ameynevrekar

 

Hi! This is vba code. It needs to be copied and pasted into Excel vba and run it from there. My recommendation is to save a backup copy of your workbook with a new name for safety. Turn off auto recalculationThen:

1. Create a new blank worksheet. Your wiil be copying data from your protected to the new worksheet. 

2. Use the process I described to copy all of the columns with data in your protected worksheet. For example if your data starts in column A, click on column A to highlight the entire column. Don't release the mouse button yet

3.  Move the mouse to the right, selecting additional columns until you have selected all columns with data in your worksheet. Right click and copy the columns. 

4. Select the new worksheet you created. Select the first column you copied in your protected worksheet (in the example above it was column A)

5. Paste the data into that column. You now have an unprotected copy of your protected worksheet with all of your data.

6. Rename your protected worksheet to something else. Then rename the new worksheet to the same name that  your old protected worksheet was named.

7. Delete the old protected worksheet 

8. Turn on auto recalculation

 

If something gets messed up you still have a backup of your original workbook with the protected worksheet if needed. 

 

Good luck! 

 

I do not recommend running or using vba code if you're not experienced. If you want to pursue that course of action, then search the internet for how paste code into a vba module. I'm not able to help further on doing that.

I DO recommend that you use the much simpler and easier method that I previously posted.

 

Good luck

It won't return #REF errors if you turn off auto recalculation BEFORE copying the sheet, pasting into a new sheet, temporarily renaming the Protected sheet, renaming the new sheet to the same exact name as the old, protected sheet, turning auto recalculation on again then deleting the old sheet once it is confirmed that the new sheet is working properly.

how do I open the VBA for the file as it won't open without the password?
This worked for me!

@kezb03

Great, glad to hear it! If you have a chance, please like my answer!