Close Window   
Free Ebook
Get Your Free Excel
Our Top 15 Excel Tutorials
Instant Access!
Subscribe for Free Excel tips & more!

How To Remove Workbook Password.

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

Hi, I accidentally placed a password in my workbook. Now, every time I open the xlsm file, it requires me to input a password. (thankfully i was able to guess the password.) I tried protecting and unprotecting the workbook using the one under review tab, but it's still there. This happened after tinkering the macros. Any ideas?

View Answers     

Similar Excel Tutorials

Password Protect Excel Files
How to keep an Excel workbook safe by encrypting it with a password. This will make it so that a user cannot open ...
Allow Only Certain People to Edit Specific Cells in Excel
How to allow only certain people to edit certain cells or ranges in Excel. This is a security feature that you can ...
Password Protect Excel VBA Macros
How to password protect VBA code and macros in Excel so that a user cannot see the code or edit it or do anything ...
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 protect ...

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
Output the Name of the Current Excel Workbook Without the File Extension - UDF
- Free Excel UDF that displays the name of the Excel workbook without its extension. This is a great UDF (user defined fu
Output the File Path to and Name of a Workbook in Excel - UDF
- Free Excel UDF (user defined function) that displays the full file path and name of an Excel workbook. This function is
Close a Workbook after a Time Limit is Reached
- This macro will automatically close the workbook in which it is located after that workbook has been opened for a certai

Similar Topics

i have this code found on the net for protecting/unprotecting my workbook, however i am unable to work out the password, i have tried Password Input and changing it to other passwords but cant figure out what i'm missing.

sure it must be simple but just cant see it,

any help appreciated


Option Explicit

Sub ProtectAll()

Dim wSheet As Worksheet
Dim Pwd As String

Pwd = InputBox("Enter your password to protect all worksheets", "Password Input")
For Each wSheet In Worksheets
wSheet.Protect Password:=Pwd
Next wSheet

End Sub

Sub UnProtectAll()

Dim wSheet As Worksheet
Dim Pwd As String

Pwd = InputBox("Enter your password to unprotect all worksheets", "Password Input")
On Error Resume Next
For Each wSheet In Worksheets
wSheet.Unprotect Password:=Pwd
Next wSheet
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

End Sub


I have a workbook containing 4 worksheets. I have protected all the worksheets with password.

I want to define a global password for the workbook for protecting and unprotecting.

Also i wnat to use the said globally defined password in macros.

Where and how do i define the password whcih can be used globally.



Please help!

When password protecting an excel sheet (using the 'password to open' option), by pure fluke I think, I have mis-typed the password twice because it was accepted when I set the password but it is now not unlocking when I type what I believe to be the correct password that I set.

Does anyone know how I can get around this?


When I open my excel workbook I would like a password box to appear (I would like to add the text "Please Enter your password for Country" )
- If password is correct the box will simply dissapear and editing can be made
- if password is incorrect I want a MSG box to appear saying "Password is incorrect" and it then simply closes the workbook.

NOTE: I when this password box pop's up automatically when opened I want nothing else to be accessable until password is correct.

I know I can just us a password protection in the options menu but I am linking lots of information off this workbook and the password will cause problems.

Any ideas out there?


Is there any way of finding out if a workbook requires a password to open (as opposed to no password or just one to modify) prior to opening it?

The reason for this is I want to set up a workbook that opens other listed workbooks in turn, recalculates them and then saves them. I want to run this overnight when a user will not be present so I don't want the code to stop while it asks for user input.

I've set it up so the user can list passwords so it may open workbook A (using a specified password, recalculate it and then save it) but if it opens workbook B using a password but there is a link to workbook X and X requires a password to open then it asks for user entry. What I want to do is loop through each of the links in workbook B and establish whether any of those linked workbooks require a password to open prior to updating the links. If they do the code will move on to the next workbook.



Hey Guys,

Our company is using sharepoint, so we no longer need to keep passwords on our excel files. Also, we just recently upgraded from 03 to 07. However, we can't find out how to remove the workbook password in excel 07. To be clear, Im not talking about the password to let you edit items in the sheets and what not. Im talking about the password you are prompted for BEFORE the workbook is even opened! It will say "test.xls is reserved by JSA715 Enter password for write access, or open read only."

I've tried all of the password options under the review tab, none of them work.


Hi All,
I Have a macro enabled workbook and i am trying to set it that only people with the password can open the file, I can set the password for modifying the file but when i set it for opening the file, i get this message;

"This workbook contains Excel 4.0 macros or Excel 5.0 modules. If you would like to password protect or restrict permission to this document, you need to remove these macros."

But i cannot remove these macros as they are integral to the sheet...!!!

Please help!!!

I am using Excel 2003.

I have a workbook with password protection for opening. When I open it, Tool>Option>Security shows the password as asterisks. I remove them. I then SaveAs and under Tools, General Options, Remove the Asterisks for Password to Open. I then continue with the save.

Then I check that the password has been removed, but it has come back.

I have put an Exit Sub as the first line of my Before_Save code so I know that the code is not doing anything.

Does anyone know what stops me from removing the password to open the file.

Hey.. I am trying to figure out how to set up a workbook so that all of the following can occur:

1) The workbook is shared
2) It requires a password to open up as editable, otherwise it will open up as read only.
3) If it opens up as editable, it should require another password to be edited except when editing certain columns. (aka, the workbook should be protected except for certain columns).

So to clarify, if I open the file and do not have the password, the only thing i can do is view the data - I cant edit anything. If I have the password to open the file, all I should be able to edit is certain columns, unless I have the separate password to unprotect a sheet which will give me full control.

Is there a way to get all of these things at the same time? Are there any problems when running shared excel files over a network where 2 users are able to edit the file?


My version of MS Office is 2003. I has a password for my workbook and had
not used it for a while. This password was only known to me. Now when I go
to the workbook and put my password its says I need to check whether the Caps
lock is on or not. But I think I am typing the right password, But I guess
its not correct. I do not know how to rectify this problem, as Microsoft
help does not offer this solution.

Please help. Thanks


I am hoping you are able to assist.

I am trying to write a macro to open a workbook. The file requires a password to open it - this is my own workbook and i know the password.

Is it possible to write a code (similar to Workbooks.Open Filename etc) that allows you to enter the password automatically. I need to open the file when the macro runs, but not allow others to know the password.

I hope this makes sense.

Many thanks in advance,


I'm using VBA to process all of the workbooks in a particular folder.

If I open a workbook via VBA without passing a password, Excel prompts me for the password and the VBA macro halts until a password is provided by the user.

I need to simply note that the workbook requires a password and then skip it as the macro must be able to run unattended. Is there any way to prevent Excel from asking for the password and simply throw an error which I could trap?


Hi all,

I have creadted a password protected workbook. Now I create another one with some cells linking to that workbook. Every time I open the second workbook and allow updating, it asks for the password. Since I create both workbook, I do not want to enter password again and again. Can someone guides me to insert the password automatically?

Best regards,

I'm using one workbook (A) to contain VBA which needs to open another workbook (B). The workbook B has a password (to modify -- the password was applied via SAVE AS, TOOLS, GENERAL OPTIONS, Password to Modify) I can't seem to get the syntax right in the VBA to open workbook B by supplying the password as part of the WORKBOOKS.Open Filename:="C:\thatfile.xls" statement.

I have a workbook that contains a series of macros designed to compare various reports and spit out a report. I don't want my users to have to insert a password, but I want to keep my workbook protected. I've already protected the macros in the VBA Properties, so those are pretty safe, but the worksheets in the workbook are susceptible to changes that will hose my macros.

Setting the workbook to "Read Only" in Properties on our shared drive helps, but any user can change that at will. Within Excel, going to Options, Security, I can set a password so no-one can modify that workbook, but that pops up a password box when they open the workbook. I'd like to NOT have the password box pop up unless I need to make changes. Is there a way to do that? I've looked on the internet but can't find a solution on this one.

Thanks in advance.

Hi there.

I have recently encountered a problem with my excel program, in which the manager of a particular shop is being very sour about change, and it is my impression that he is purposefully unprotecting and protecting the sheet again after mucking around with little bits of formulae.

I know that I can use a password to prevent people other than myself to unprotect the sheet, but this isn't ideal, as my vba coding requires the unprotecting and protecting of the sheet. is there a way that i can get around having to type in the password everytime i use a piece of code?

Many thanks


I have a form that opens up with a username and password to open an excel spreadsheet. I would like the form to enter the password into the "file open password" (the normal password prompt for excel to protect workbooks to be opened)

I am not opening another workbook so I cannot use workbook open with password:=xyz etc.

How can I do this?

Hello everyone this is my first time posting on this forum and I am in need of a little assistance.

I have created a multi sheet workbook in excel 2003 that is being shared so multiple people can update the sheet from different locations. It is being used in a trial basis right now

I know the process involved in protecting the sheet,workbook and password protecting different ranges in the sheet, workbook. however what I would like to accomplish I don't know if excel can do or if it can I don't know how.

the issue with password protecting a range of cells is that once someone has entered the password the worksheet is left open for all to change unless the xls document has been closed and reopened.

the outcome that I would like to achieve is to have a multi user password protected sheet and password protected ranges that each user has his/her own password. When they are done editing a cell/cells I would like it auto save and passlock the worksheet again so that it is not left open.

The workbook is shared over the network and eventually will have about 21 people working on it at the same time and it would be nice to track who is making what changes.

Hi guys,

I'm creating a macro that batch runs all of my reports for me before I get in on a Monday morning.

I've hit a problem. ALL of these reports are password protected so as soon as I get my code to open the workbook it sits there waiting for me to enter the password to open the workbook as read/write access instead of read only. How do I get the code to open the workbook with my password when I open it so the macro can continue to run my update macro contained in that workbook.

I also have an input box in the update code in these workbooks that requires a password to continue with the update. How do I get my code to put the correct password into this inputbox in the updatecode?


I have a workbook with many worksheets.
I have all worksheets protected thru a password. I have macros to allow the user to enter the data.

I have 7-8 macros which i run on press upon different buttons to copy data in protected sheet by unprotecting the sheet thru password in a macro.

In this case, i am explicitly defining password in macro. Is there any way, whereby a global password is defined in Workbook 'view code' area and can be used for in all the macros.


Hi Friends,

I have two excel workbooks, named as "A" & "B", where "A" workbook has password protected, so when you will open the "A" workbook system will ask you the password.

In workbook "B", I have set two rows as : A1 = Old Password, B1=New Password & and a button named as "Password Change".

now what I want is, when I click on a Button which is available on workbook "B" , the system or macro will check Old Password(A1) and Workbook "A" 's opening password if it matches, then the new password will be set as mention in the workbook "B" of B1.

Waiting for your kind reply.


Try this on excel workbook.

Protect workbook with password 'AA' (without quotes). Now try unprotecting workbook using password '3x' (without quotes). It unprotects without issues. Let me know if it works for all.

----- Excel cracker is here. No liecense required. Post me your password problems.

Hi All,

I open my workbook using doubleclick method and it shows me a dialog box to input password or open as read only file. How can i input password in this dialog box using send keys. Assume my password is PASS.



I need a workbook to be viewed on a network, but only allow editing access to a few people.

I have tried Tools/Options/Security Password to modify, but it can still be saved as a copy to the network which becomes very confusing to many.

If I use Tools/Potect Sheet, I need to re-enter the password for all sheets twice.

I am trying have it so that everyone is read only, select people can edit (with same password). Password protect all sheets and the workbook with the same password everytime when the workbook is closed

Basically 2 questions
1) Is there a way of remembering a password so that when the workbook is closed it and all sheets are automatically protected with the same password every time

2) Is it possible to have it not copied unless it is opened by an editor

Hi Professionals!

I want to run a simple macro that enables me to unlock and lock all sheets at once with the same password through a single userform BUT that also requires that I put another form of identification in before it will run.

Simply, I have created a userform that asks me for two pieces of information, a pin number and a password.

I would like the pin number to be validated before the password is applied.

something along the lines of

PIN = 5555
Password = secret
'if textbox1.Value = "5555" and textbox2.value = "secret" then protect/unprotect all sheets using password.

Else MsgBox "Either your PIN or Password do not match, please check and try again."

I'd like the same code to run for protecting and unprotecting .

Help appreciated