Remove a workbook password

Giordano Bruno

Well-known Member
Joined
Jan 7, 2007
Messages
1,356
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.
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Are you using the correct password ??
You can't eliminate the password protection until the workbook has been unprotected.
This is an area that is very sensitive on this board and assistance will not be given to "remove" passwords.
 
Upvote 0
Thanks Michael,

Yes. I know the password. This is my workbook. I am not trying to break into a workbook. I wish to distribute the workbook and some of the worksheets are protected by the same password as is required to open it. I don't want to give out the password, but they cannot open the workbook without knowing it.

I don't why the workbook keeps protecting itself and cannot find a way to remove this protection.
 
Upvote 0
I would suspect a Before close or Save macro is resetting the password.
Maybe post the code you are using in case of an error in there.
 
Upvote 0
Michael,

The Before_Save code has Exit sub as the first line and stepping through the code shows that it hits this line and exits. The password asterisks reappear after saving. I do not have to close the workbook for the problem to occur.

Thanks for the response, ZVI. Is there a distinction between files and workbooks? The instructions appear to be the same as I noted in my first post. Perhaps I am missing something.

The instructions tell me how to apply a password. I have assumed that removing the asterisks is what is required to remove the password protection. Do you know of anything sles that I should be doing?
 
Upvote 0
Just one thing that I've just thougt of; the workbook in question is now an xlsm and I think its tendency to protect itself with the worksheet password started when it changed over. Maybe that's relevant.
 
Upvote 0
File level of the password protection differs from the workbook level one.
File protection is much stronger and if file protection is set then you can’t load workbook into Excel at all without correct password.

To remove file level protection:

1. Open your workbook and enter the file level password you designated while protecting it

2. Initiate SaveAs dialog via Office button - Save As XLSM

3. In dialog window on left bottom side click "Tools" button and choose "General Options"

4. Select the password text entered in the "Password to open" text field and delete it

5. Select and delete the password text entered in the "Password to modify" text field.

6. Click "OK" and then click "Save"

7. A dialog box asks you to confirm that you don't want your Microsoft Excel 2007 document to feature password protection at file level anymore. Click "Yes".
 
Upvote 0
Many thanks for that ZVI. When I try what you suggest, I don't get item 7. Is this because I am trying to do this using Excel 2003?

I changed the password to 1234 and saved, then closed the workbook. I opened it using 1234 and then deleted the password and saved the file. I then checked the password and it had reverted to the original much longer password. I have put Exit Sub as the first line of my Open, Close and Before_Save macors, so they are not doing anything.

When I open the file in a computer using Excel 2007 I am not asked for a password at all.
 
Upvote 0
1. Please clarify what level of protection you are facing with?
If Excel asks for the password at loading then it is file level of protection.
If you can load workbook without password entering, but can’t add new sheet then it is workbook level of protection (menu Tools - Protection – Protect/Unprotect Workbook)

2. There also can be Add-In or the code in PERSONAL.XLS which sets protection automatically.
Try to load Excel in safe mode and repeat password removing.
For safe loading click Start button on desktop
Choose Run and type the command: Excel /s
Click OK.
Load workbook via Excel’s File menu.
Delete both levels of workbook protection.
Save workbook and reopen it.
 
Upvote 0

Forum statistics

Threads
1,224,566
Messages
6,179,555
Members
452,928
Latest member
101blockchains

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top