0 votes
in VBA by Beginner (8 points)
Dear all

Is there a way to unprotect all worksheets within a workbook quickly where I don't remember the password?

I have had to make up so many passwords over the years, I cannot remember them and now cannot unlock them :( Using Excel 2016

Would appreciate any insight into this.
by Expert (892 points)
I don't think this is legal request ...

2 Answers

0 votes
by Skilled (279 points)
0 votes
by Beginner (35 points)

Another option is two quick lines of code (which shows that Excel password-protection is not very good). I had to do this recently when I mistyped my password (somehow I did it twice). But I tested this on Excel 2013. I'm not sure if it works on versions after this. With a little adjusting you could make it automatic from one file to another or one sheet to another.

Sub testcopy()

    Sheet2.Range("A1").PasteSpecial xlPasteAll

End Sub

This copies everything from Sheet1 (which is password protected) to Sheet2 (which is empty). 

Welcome to wellsr Q&A
wellsr Q&A is the VBA and Python programming community that rewards you for learning how to code.

Getting Started
VBA Cheat Sheets (On Sale Now)

Earn free prizes for asking VBA and Python questions and for answering questions asked by others in our community.

Looking for something else? Hire our professional VBA Help, instead.

What makes us different?
Our points system rewards you with a chance for free gifts based on the quality of your questions and answers. All you have to do is post and you could get rewarded, like these members:

ParserMonster $25 Amazon Gift Card
Hightree $10 Amazon Gift Card
Thales1 $10 Amazon Gift Card
runfunke $10 Amazon Gift Card
coolag $10 Amazon Gift Card
Siew Hun $10 Amazon Gift Card

So, why don't you join us? It really is an encouraging way to motivate members in our VBA and Python community.


For more programming tips visit the VBA Tutorials Blog and the Python Tutorials Blog.