Email:      Pass:    Pass?
Close Window   
Free Ebook
Get Your Free Excel
Our Top 15 Excel Tutorials
Instant Access!

Subscribe for Free Excel tips & more!

Free Excel Forum

Unlock Vba Project

Forum Register
Search Excel Forum Posts, Tutorials, Macros, Tips, and More


I need to unlock the VBA project in an Excel file, but I don't know the

I know, that there is a brute-force password cracker for protected
worksheets, but only for worksheets - no VBA projects.

Is there any other tool for this?

Note that I already know, how to extract source codes from Excel file (using
modified ClamAV) - but I need also to modify it, not only extract...

Thanks in advance!


View Answers     

Similar Excel Tutorials

Make Users Enable Macros in Order to View a Workbook in Excel
Tutorial showing you how to make a user enable macros in a workbook in order to view the workbook. This is very im ...
MODE() - Find Most Repeated Value in a List in Excel
The MODE() function in Excel allows you to quickly find the most repeated or frequently occuring value within a lis ...
Prevent a User from Changing Any Data in Excel
I'll show you how to lock a spreadsheet so that nothing can be changed in it. This is a great feature to use when ...
Print Comments in Excel
How to print the comments in a worksheet when you print from Excel. This includes how to print the comments within ...

Helpful Excel Macros

Protect and Unprotect All Worksheets at Once
- This will allow you to protect or unprotct all worksheets in a workbook at once. It doesn't allow you to input a passwor
Hide Formulas in a Worksheet and Prevent Deletion
- This macro will hide all formulas within a workbook and not allow them to be deleted. The page will not be protected li
Name Worksheets Based on Cell Contents
- This macro allows you to have your worksheets named by whatever is in a particular cell within a worksheet. This means
Create a Bar Chart With a Macro in Excel
- Create a bar chart in Excel with this macro. You will be able to quickly and easily turn any range of numbers and data
Delete a VBA Module From Excel
- Delete a VBA macro module from Excel with this macro. This macro allows you to fully remove a macro module from Excel.

Similar Topics

reverse excel's password encryption?

I need to modify the vba project but it is password protected. The sheets were also protected but I used a brute force to find AABBBBABBBAN

Since the encryption doesn't work for vba, is there anyway I can find out what the original password was before it was encrypted? (assuming the person used the same password for both the vba project and the worksheet)

I need to unlock several worksheets and several hundred workbooks and the password has been typed in two different ways. One word is typed in a lower case,the other is mixed case.. same password. I found Smittys code that will unlock all of the worksheets but I need to modify it so it can unlock both formats.

Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
ws.Unprotect password:="password"
Next ws
End Sub

Would I just add this line of code:
ws.Unprotect password:="Password"

Hi friends,

I want to change/reset VBA password for Access VBA projects from VBA code itself.

While googling, I found few code to unlock Excel VBA project but I was unable to modify them for access.

Basically I want to set/remove VBA password of one mdb file programatically from another mdb file. I'll be having the VBA password, so this is not for recovery purpose.

Thanks in advance.


Hi: We all know that we can protect our VBA Project Code from Viewing by checking the Protction Tab within VBA Project Properties and entering a password.

Question: In doing so, is a macro prevented from running without adding a line of code to unlock and lock the VBA Project Properties?

I have a portion of a macro that enters a checkmark to a Control Box Checkbox. The portion of said Macro ran fine until I locked the VBA Project Properties. Within the Macros, there is already a line of code to unlock the worksheet that is also password protected, but does one also have to unlock the VBA Project Properties in order to run a macro???

The first part of macro unlocks the sheet via:

ActiveSheet.Unprotect Password:="X"

However, the macros presents with error when asking a checkbox from the Control Toolbar to be checked when the VBA project Properties are locked vs working prior to locking the VBA Project Properties from viewing, The portion of the macro that ceases with a bug is:


For Each ctl In Worksheets("Sheet1").OLEObjects
If TypeOf ctl.Object Is MSForms.CheckBox Then
ctl.Object.Value = True
End If

Help is appreciated: Unlock VBA project Properties vs a better way to have a macro check a checkbox?

Is it possible to have a macro unlock all of the worksheets in a workbook, each worksheet is password protected (they all use the same password). It would be nice when I am updating the protected cells that I can unlock all of the spreadsheets at once and then lock all of them when I am done.


I have more than 30 excel files and each file has macros locked for viewing. I used the same password to lock the VBA Project of all the files.

To modify the macro codes (or VBA components procedure and code modules) in all those files stored in a different directory, I have developed a macro procedure to automate the process. I run into error becos the macros to be modified in the files are password-protected in the VBAProject property.

How can I include the known password in my procedure so that I can first unlock the VBAproject before I modify the code modules in the remote files. Thanks.


Pwd = InputBox("Please enter Password to unlock the workbook.")

For Each ws In ActiveWorkbook.Worksheets
ws.Unprotect Password:=Pwd
If Err  0 Then
        MsgBox "You have entered an incorect password. All worksheets could not " & _
        "be unprotected.", vbCritical, "Incorect Password"
    End If
    On Error GoTo 0

Next ws

End If

I am using this code so that users can unlock all worksheets with a password.

when users click "cancel" or supply the incorrect password, the debugger comes up and I don't want users to go to the VBA code.

I need to modify the code so that when users enter the wrong password the routine just exits ...

i tried doing it with the code above but doesn't work.

could anyone help ?

Hello Team,
I have one macro file which is password protected but I had missed out the password.....Can you please unlock the file for me.....If you want I can send the file to you as well...

Dear Forum

Please help with codes to extract multiple zip files into a specified folder.

Need to extract 1000s of zip file having one excel file in it. Every excel is password protected. Aware of the password and is also listed in an excel fie.

Can code be written to extract zip files which should lookup/check from the list of password stored and extract files / content to specified folder.

Please code at your earliest

Hello! I have addin containing several worksheets. The addin is an xlam file in excel 2007. Some of the worksheets contain vba codes (such as worksheet selection change event) in the sheet code module.The vba project of the add in is password protected. Some worksheets from the addin get copied to the current active workbook. The vba modules of addin can not be viewed because they are password protected. However the sheet codes of the copied worksheets from addin can be viewed. How can I password protect these worksheets codes?

So, I have my VBA project locked, and i still have the password,but for safety, i'd like to have a macro to unlock this password in case i forget it.
Is is possible?

Hi ,

I have an issue with unlock vba project.
I need to do following.
1). When vba project unlock message popup say "If wrong password attempt VBA CODE will delete"
2). If the user attempt more than three need to delete macro module.

If any body have any clue as how above mention two stept automate in excel(VBA MACRO) Please let me know.
Now I'm really sufferng with this issue. I gone though several thread, But no one has clear idea on that. Pleassss


I have a file created by someone who left the company and did not leave a password to unlock a protected sheet.
Is there a way to do this without a password?
It is a complex file, so I don't want to recreate it if I don't have to.


Hi Guys,

Can someone show me how I can unlock a range of sheets that are password protected in my workbook.

I have 20 identical sheets one for each department which are protected by the same password.

It would be nice if I could rapidly lock and unlock these sheets.

What I need a set rng command in conjunction with a For Next loop?

Thanks in advance.

I have protected my excel sheet with this command
activesheet.Unprotect Password = "12345"
now i have to edit sheet but it can't be unlocked by entering 12345 as password after pressing unlock sheet button in review says you entered wrong password
so i want to ask ,is there any way to unlock this sheet..???

sorry some typing mistake, its
activesheet.protect Password = "12345", userinterfaceonly=true

I have protected some worksheets and have very stupidly forgotten the password. Is there a way that I can unlock the sheet without knowing the password. I can't be the first person to have done this....can I?

It is quite a complex sheet, is there a way that I can copy the data to a new workbook if it is not possible to unlock teh protection?

I've noticed that, on occasion when I protect the vba modules with a password, and copy the Excel workbook containing the password-protected modules, to a different computer, when I then try to unprotect the vba files I get a status message that says "Project is unviewable" with a dialog title that says "Project Locked". I am not presented with the password entry dialog box as usual so am unable to enter my password to unlock the vba code.

Why does this happen?



Hello Everyone,

Would anyone be able to provide information on why I'm unable to save an Excel file when my VB project is password protected?

The message I receive is, "...You cannot save to this file format when the VBA Project is protected. You may unprotect the VBA project..."

The VB Editor is purposely locked (to not allow users the ability to modify code). It seems as though I have used many .xls files, where the VB Editor is password protected and I haven't had any issues saving the file.

Any ideas on what may be causing this?

Thanks in advance to everyone.

I recorded a macro for protecting my worksheet and included a password. The macro didn't have any reference to the password. Why would that be?

Also, I use the macro in a VBA module and add the phrase Password:="MyPassword". The page is protected but I can unlock it without the password.

I need a routine that will lock the page so users cannot unlock it without the password.

Hi. I hope that someone can help me with this.
I got this userform from my previous employer, this was a project that had been abandoned in a process. I would like to make it work but it is password protected.
Is there any chance to unlock it?
I have tried few password unlocking programmes but it always comes back with the message that spreadsheet isn't protected?????
I have almost gave up on it and you are my last chance :-)
I would be grateful if someone can help me with this.
Thank you


I have been sent a file to work upon..... it has a macro in it which i want to look at....

but when i try to open the vba project of this file a pop-up appears saying "project is unviewable".... it does not asks for any password also.....

I contacted the person who sent it to me and he said he never put any password to the vba project of the file .... he is also unable to see the project...

can anyone please tell me why I am getting this.... and how to open the project in vba....
how can it become unviewable when the creator did not put any kind of lock or protection to it... and had it be done the project should have atleast asked me to provide any password to view the codes..... please help...


Hi All,

A while ago I built a report template and had VBA protected with a password and now I can't find my notes which tells me what password i used.

I've searched the forums and a number of people say how easy it is to circumvent the vba protection but don't say how.

Can anyone give me any tips how to unlock this in some way without having to buy a password cracking tool?


I need to password protect a VBA project. This is being done internally and the people with the password will be within the office. How do I do the protect. The worksheets will be password protected, but in order to perform sum of the operations the worksheets will be unprotected and then reprotected. We are trying to protect the password that will be in the documentation in the macro.

I have a workbook in excel 2003 with no vba code, but which includes some sheets that are "veryhidden". The VBA project is locked with a password. When I try to open the project I am asked for the password and cannot view the veryhidden worksheets without this password. This seems to me to be how the password system is supposed to work.

I then copy the file to a computer running Excel 2007 and find that there is no protection on my VBA project. In the VB editor I can see all of the worksheets.

Does anyone know what has happenned? Is there a workaround. It seems that if the workbook has some VBA code, the protection does work, but not if the workbook contains no VBA code.

I have the age old issue of a member of staff having created a password protected VBA project. This member of staff has now left the company and not unlocked the project. Therefore it's not possible to make changes to the code.

Is there some code I can use to extract the password?

Or is there a method of recovering the password that doesn't involve spending money on password-recovery software?