Remove Document Password In Excel 2010

I have a document that was created in Excel 2010 and requires a password to open. How do I remove the password so that it is no longer required?

Free Excel Help Forum

- Ask any question about Excel and have it answered in no time.

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 ...
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 ...
Remove Personal Information from Excel Files
How to remove all personally identifiable information from an Excel file. When a file is created in Excel, it auto ...
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 ...

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
Open a Word Document from Excel
- This Microsoft Excel macro will open a Microsoft Word document from excel. With this macro, you can open any word docume
Open Microsoft Word from Excel
- This free macro will open the Microsoft Word program on your computer. You do need to have this program first. This wi
Remove Comments from a Workbook in Excel - All Comments Deleted - Macro VBA
- Excel macro that will remove/delete all of the comments from an entire Excel workbook. This means that this macro will

Similar Topics

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!!!

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?

I have created a worksheet some time ago and protected certain cell within it
and gave the worksheet a password in order to edit it. Unfortunately I can
no longer remember the password and to save me creating the worksheet again
it would be better if there was a way round this or a small program that will
remove the password for me. Your help is appreciated.

Can't Remove password protection
I inserted the following code into one of my workbooks to password protect the document before closing which works great, however when I reopen the workbook I type in the password the workbook opens and then I try to remove the protection but it is stuck and in the protection it keeps saying that the workbook isn't protected. I then removed all macro code from the workbook and saved it as a different file name however it still stays protected and there is no way to remove the protection, can someone please help with this.

Application.DisplayAlerts = False
ThisWorkbook.Password = "jaye"
Application.DisplayAlerts = True
ThisWorkbook.Saved = True

I forgot my VBA macro password. Can I retrieve or remove the password

This is very bizarre. I have an excel document that is password protected
and can be open by everyone except for this one computer. It's saying that
the password is not correct. It doesn't matter who is logged in so it tells
me it's computer specific. I have tried a different keyboard, with no
luck...any suggestions would be great.

Hello all Excel Guru's:

We have a small problem that we need assistance with. We have a excel
file that is password protected and at the time was created and
maintained by a former employee.

For the past several weeks now, we have not accessed the file because
we never really had a need to do so; until now.

The spreadsheet needs to be updated and modified to accomendate new
data that it is pulling in from a bloomberg terminal. No one seems to
recall what the password is and when we tried contacting the former
employee, the password that is given is also incorrect.

Is there a way via MACRO or Add-in that we can write or load to reveal
the password? I hate to have to re-do this spreadsheet if I don't
have to.

Any and all help in this matter is greatly appreciated.

I have created an Excel sheet that retrieves data from a ODBC source. I have created a macro using macro recorder to refresh the data by re-connecting to the database. However, the connection requires a password prompt and when the macro is run, you are still required to enter the password.

Is there anyway to make the macro so that the password is automatically entered and the user will just have to press a button to fully run the query update? Thanks for any help on this.

Some of our users on Excel 2007 (including myself) are receiving the error below when trying to password protect a .xlsx file. The error message does not appear when applying a password to a .xls file. After the password is "applied" the .xlsx file becomes corrupted and the error is shown "Excel cannot open the file 'FILENAME.xlsx' because the file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file.". Please note that this only affects some Excel 2007 users and only applies to those affected users when placing a password on .xlsx files.

I have checked out the event logs and reinstalled Office 2007 without success. Does anyone know the answer?

Error message when applying a password to a .xlsx file

The document was saved successfully, but Excel cannot re-open it because of a sharing violation. Please close the document and try to open it again.

Steps to Reproduce:

1. Open Excel
2. Office Button | Save
3. Tools | General Options
4. Enter password in Password to open field | Click OK
5. Reenter password | Click OK
6. Click OK to save file
7. Error above is received.

I'm hoping one of the experts here will be able to save me stacks of work.....

An excel file of mine became corrupt for no obvious reason, after following numerous 'manual' guides for recovery I began trying pay for software demo versions to see if it would be worth the money to recover my file - they don't work either.

As far as I can work out the issue is with the password protection, but as I can't get into the file (I get an 'unable to read file' message) I can't remove the password, and without doing that it appears I can't recover any of the data.

Can anyone suggest a solution?

If it helps, the file is saved in excel 2003, the password is required to open the file.

Thanks in advance.


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,


Is there a way to password protect an Excel document, but allow for READ ONLY
access if the user doesn't know the password?

I created a macro on my PC laptop and now I'm trying to open it up on my iMac. I put a password on the VBA project so whenever I try to view it I'm supposed to enter a password. It keeps saying invalid password. Is this because I created it on a different computer?

Hi all,

Firstly, apologies if this is a "schoolboy question", but it's something
I've never encountered before, and want to ensure it's not something simple
before referring to our central IT.

A spreadsheet document is set to require a Write password when opening. The
document itself is not set to "Read Only" in its properties. For all users,
except one, the document opens correctly, requesting a password to enter
read/write mode.

For a single user, however, the document defaults to "Read Only" mode
without requesting a password.

This has been the case for a week or more. The user in question has the same
access permissions to the folder in question as the users who can open the
document ok.

Are there any settings on her Excel application that would cause something
like this to happen? She's able to use other Excel documents from other
locations which have exactly the same properties in the way that she should,
so it seems to be something particular to this document - but everyone else
can use it OK!

Any ideas would be gratefully received!


Please help me the following situation.

1 I created survey in 2003 version with password protection to change ( it will forbid people to change anything except some cells in the sheets). Not password protection for workbook (TOOLS/OPTIONS/Password to open)

2 But when people send back those surveys, some of them will covert that into 2007 versions (.XLSX)

3 So I open those 2007 version surveys (.XLSX), every time password prompt will appear before I can view anything. (actually I could give any password. The system will accept it)

4 I created macro to disabled that

Workbooks.Open Filename:=xxx, UpdateLinks:=0, password:="0"

It does not work. Please let me know if it is clear. I really appreciate it.

I'm trying to use VBA to go to a website that requires a User Name, Password, and a Submit Button.

So far I can get everything to work besides the Submit part. The code runs without errors, but doesn't actually "hit" the submit button on the webpage.

For posting, I removed my actual user name and password and and used the generic " User Name " and " Password " highlighted in blue.

I highlighted another section in green that I took from a previous post hoping it would solve my problem. The link is:

Here is the code I am using:

Sub GoToWebSiteAndPlayAroundNew()

Dim appIE As Object ' InternetExplorer.Application
Dim URL As String

Set appIE = CreateObject("InternetExplorer.Application")
URL = " "

With appIE
.navigate URL
.Visible = True

Do While .busy: DoEvents: Loop
Do While .ReadyState 4: DoEvents: Loop

.document.getelementbyid("fUserName").Value = " UserName "
.document.getelementbyid("fPassword").Value = " Password "

End With

On Error Resume Next
x = 0
For Each mitem In IE.document.all
mitem.Value = "x"
x = x + 1

x = 0
For Each mitem In IE.document.all
If x = "Submit" Then
Exit For
End If


End Sub

Im using VBA to create a new workbook and copy paste info into that work book. This work book will then be emailed off to someone else, but I would like to add a password to the file so it can only be open with the password. In 07 you can do this by going to the encrypt document option, but I would like the code to do it when it creates the file. Is this possible?

I posted this on an earlier thread, but was urged to start a new one.

I'm trying to create a program that will automatically log in to a website that requires a username & password. I am able to enter the username and password in the correct text boxes, but I can not get the form to submit to approve the login. It refreshes and removes the password.

I have attached my code. The web url is inside it. Thanks!


Sub IE_login()
    Dim ie As InternetExplorer
    Dim C
    Dim ULogin As Boolean, ieForm
    Dim MyPass As String, MyLogin As String
    Set ie = New InternetExplorer
    ie.Visible = True
    ie.Navigate ""
    'Loop until ie page is fully loaded
    Do Until ie.ReadyState = READYSTATE_COMPLETE
    'Look for password Form by finding test "Password"
    For Each ieForm In ie.Document.forms
            ieForm(5).Value = "****"
            ieForm(6).Value = "****"
            Exit For
    End Sub

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.


Dear NG,

Please help me. I am trying to remove the "password to open a workbook"
using the code below. Although, it runs well during execution and does not
show any error messages, when I try to manually open my workbooks, it still
ask for password.



Sub RemoveOpenPassword(myFilepath As String, myFilename As String, _
myOpenPassword As String, myWritePassword As String)
Dim Wb As Workbook
Set Wb = Workbooks.Open(Filename:=myFilepath & "\" & myFilename,
Password:=myOpenPassword, _
WriteResPassword:=myWritePassword, AddToMru:=False)
With Wb
.Password = ""
.Close True
End With
Set Wb = Nothing
End Sub


I'm required by my manager to produce password protected dropdown list (I use the data validation feature) for purchase order requester. I have been working on it for 2 days now, I somehow got it but it doesnt seem foolproof; as i often get error message after runnning it a few times.

Basically, all I need is to come up with a unique password for each name for listed in the "Requester". Whenever I click on it, it will prompt me to enter password.Different names requires different password, otherwise it will return as a blank cell.

I really appreciate if any of people here can help me with this, as I'm new to Excel programming. Also, kindly show me the steps how to edit data validation if possible.

Please advise,

Thank you very much.

p/s:as attached is the requester list.

Hi there,

My first time posting so apologies if I don't have the format down pat yet.

I have about 50 workbooks, each with a unique password that I know.

Once a month I have to update a few fields in each, which means I have to open the file, enter the password, make the changes, save and close.

Is there a way I could automate the process of unprotecting the files at the start? For example, could I do something to remove the protection for the given files, and then at a later point add protection back to all files?

I use Excel 2007

Thanks in advance,

We had an Excel worksheet that is used everyday suddenly pop up with
protection. I have used protection before, but this one never had a
password. We put in every known password we use, but none worked. I
resigned to re-typing the worksheet, then, inbetween Friday night, and
Saturday noon, when most of the office is out, a different Excel worksheet
has the same problem. We are using Excel 97. Any help would be appreciated.

Hi Folks,

Hope this posting isn't too long - I'm trying to provide you with as much info as possible to help me to fix this...

I'm *hoping* that someone out there (with more Wisdom than me) can help - I work in a company where people in various offices around the world are using different versions of Excel (I'm one of the 'fortunate' ones having previously used 2007 & now have 2010! )

Anyhow, this means that in the macros I'm using in a particular Workbook, I now need to save a specific Worksheet in Excel 2003-2007 'compatibility mode'. Thanks to all the great help out there, I'm currently using the following code snip to generate this file (with a password as we're ISO27001 compliant). & then save it to the User's Desktop:


DTAddress = CreateObject("WScript.Shell").SpecialFolders("Desktop") & Application.PathSeparator
FileName = "FileNameWithPassword.xls"

FullyQualifiedFileName = DTAddress & FileName

ActiveWorkbook.SaveAs FileName:=FullyQualifiedFileName, FileFormat:=xlExcel12, Password:="password" (Password value changed for security reasons )


This all seems to work fine & when I check the saved file properties, I'm told (by the Windows 2007 OS) that the file type is "Microsoft Excel 97-2003 Worksheet (.xls)"

However, when I open the new file & enter the appropriate password, I get a warning message stating:

"The file you are trying to open, 'FileNameWithPassword.xls', is in a different format than specified by the extension...Do you want to open the file now?"

If I change the file format to be CSV (& remove the password as I've seen they're not supported), everything works fine.

Any thoughts / comments / ideas on why this may be happening & how to fix it would be much appreciated.



I've played with the password feature and it doesn't look like it is doing what I want it to do. Can a password be created for administrators to have access to edit the spreadsheet and employees only read the spreadsheet?