Forum Discussion

NikolinoDE's avatar
NikolinoDE
Gold Contributor
Jan 01, 2025

How do I unlock a Workbook, Worksheet, VBA Project, without a password?

Simple explanations of unlocking to avoid misunderstandings.

 

The inventors' idea was actually to add a password to area or cell locks in Excel to ensure that other users cannot make accidental changes. In Excel, password protection of the entire workbook is the most reliable method of preventing content from being changed.

This does not mean, however, that the password specialists will also remove this password protection.

Before you start to deal with removing the password protection from your own files / Workbooks, you need to know at which levels and in what way this is possible.

Here, an attempt is made to set these up hierarchically so that the user can distinguish for themselves from the outset which protection they have and which unlocking options and effort are required.

Info:

Workbook / File formats that are supported in Excel

Very often, people confuse the term workbook, worksheet or VBA project. So be careful with the expressions.

 

Unlock a Workbook (or file, call it what you want)

Microsoft informs about unlocking a workbook: If the Office file is password-protected, you won’t be able to open it without supplying the password. There is no way to circumvent password protection.

There are many third-party providers on the Internet that offer this, but usually you are informed at the end that it doesn't work with this file...etc. Most providers use brute force to unlock a file/workbook. This might work with some older files/workbooks (like .xls), but with newer file formats it is not possible to unlock without a password. Example xlsb workbook format is robust against password cracking tricks.

It would probably be possible if you put in a lot of effort, with lots of computers and power to let brute force run for days if not months. So it is almost impossible to unlock an newer Excel workbook without the password with "little" money. Ergo, Microsoft's advice about locked workbooks/files is correct… if you don't have the necessary wallet money.

But even more so, you should be very careful with the various offers on the Internet.

 

Unlock a Worksheet

Unlock with .zip extension:

Not all Worksheets can be unlock, In general, when you protect an Excel 2007 or later version file with a password, the entire ZIP file (.xlsx) is actually encrypted with RSA encryption. It is no longer possible to change the extension to .zip and browse the file contents. Here a link with a zip example.

 

Unlock with VBA:

With VBA it is actually very easy to unlock worksheets. You just have to enter a code that is available for free anywhere on the internet, follow the steps and off you go.

For some worksheets, it can take a whole day, sometimes more.

However, in the end, I was able to decipher all worksheets 99% of the time.

 

VBA Project

Project is a Microsoft application used for project management. VBA is embedded in the Project application and can used to work with Project programmatically. The Project Object Library contains classes that make working with Project in VBA possible.

There are a few options here, but they are not applicable to all workbooks/files.

Here are some examples:

https://chandoo.org/forum/threads/remove-password.23208/

 

This article is not about cracking someone else's password to gain access to someone else's data. It is expressly not a "desirable side effect" and, above all, it is illegal. Rather, I would like to inform you about how you can get your own data back for your common Office Excel files if you have locked yourself out.

 

I hope I have cleared up some misunderstandings among some users who use Excel as a non-everyday tool and don't have much to do with VBA.

 

I would be happy to receive your feedback, ideas or comments about unlocking.

 

Happy Excel-ing!

2 Replies

  • JKPieterse's avatar
    JKPieterse
    Silver Contributor

    I wonder if the "Unlock a worksheet" section is correct. As far as I know, protecting a worksheet (with or without password) writes a special tag into the sheet's xml file in the zip container. You can still open the zip file and access the sheet's xml file.

    Similarly the workbook structure protection does not make it impossible to rename the file to zip to look inside.

    It is only the file, open password protection that encrypts the file and disallows opening it as a zip file.

    • NikolinoDE's avatar
      NikolinoDE
      Gold Contributor

      Thanks for your feedback.

       

      You can unlock the worksheet using zip or VBA, I think it is also no problem to access the XML as you mention.

       

      Protecting the workbook structure is also no problem to look inside the zip file as you mention. My aim was to define the differences between password protection of the file, worksheet protection and VBA Project protection for the user and to show the differences themselves and in a possible unlocking.

      I intentionally did not go into it in more detail, such as the workbook structure or cell locking.

       

      This article is intended for users who "only" use Excel as an additional tool or who are new to the subject.

       

      Thanks again for your feedback and definitions.

Resources