Email:      Pass:    Pass?
Close Window   
Free Ebook
Get Your Free Excel
ebook!
Our Top 15 Excel Tutorials
Instant Access!
E-mail:
Subscribe for Free Excel tips & more!
E-mail:
Advertisements



Password Protect Excel File

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

I want to password protect a whole Excel file (in Excel 2003), so it could be opened only after typing in the password, and no changes could be made. These are the instructions in Excel Help, but there is no "General Options" under the Tools menu as the instructions suggest. If I go to Tools -- Protection, neither of the choices are appropriate for this purpose. Would appreciate help. Thanks,

Protect a workbook file from viewing or editing:

1. On the File menu, click Save As.
2. On the Tools menu, click General Options.
3. Do either or both of the following:

- If you want users to enter a password before they can view the workbook, type a password in the Password to open box, and then click OK.

- If you want users to enter a password before they can save changes to the workbook, type a password in the Password to modify box, and then click OK.

4. When prompted, retype your passwords to confirm them.
5. Click Save.

- If prompted, click Yes to replace the existing workbook.

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 ...
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 ...
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 ...
Hide or Protect a Tab in Excel - 2 ways
You can create a little macro to assign a password in order to access or open a tab in a workbook. Macro Right clic ...

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
Save the Current Worksheet as a New Excel Workbook File
- This Excel Macro will save the currently visible/active worksheet (the one that you see when you run the macro) to a
Enter Text/Characters with a Double-Click of the Mouse
- This macro allows you to enter any text or number, that you specify, in a cell on which you double-click. In the exampl
Disables the "Save As" Feature in Excel
- This macro will disable the Save As feature in excel. This means that a user will not be able to resave the workbook un

Similar Topics







Hi,
I am unable to set a password to open in an Excel Workbook.
i have gone trhu the Help as mentioned below,
but couln't find the Password to Modify option.

What could be wrong with my Excel setting??

Please suggest

Thanks & Regards

Vijay Anand.R On the File menu, click Save As.
Show Me
On the Tools menu, click General Options.

In the Password to modify box, type a password , and then click OK. Passwords are case sensitive. Type the password exactly as you want users to enter it, including uppercase and lowercase letters.
In the Reenter password to modify box, type the password again, and then click OK.

Click Save.
If prompted, click Yes to replace the existing workbook with the open workbook.


Hi,
I am unable to set a password to open in an Excel Workbook.
i have gone trhu the Help as mentioned below,
but couln't find the Password to Modify option.

What could be wrong with my Excel setting??

Please suggest

Thanks & Regards

Vijay Anand.R On the File menu, click Save As.
Show Me
On the Tools menu, click General Options.

In the Password to modify box, type a password , and then click OK. Passwords are case sensitive. Type the password exactly as you want users to enter it, including uppercase and lowercase letters.
In the Reenter password to modify box, type the password again, and then click OK.

Click Save. If prompted, click Yes to replace the existing workbook with the open workbook.

I am using Excel 2007, but I want to password protect a File that I need to save as an Excel 97-2003 Workbook.

I click on Save As in the box that comes up look to the left the TOOLS - click on this

then click on General Options,

However, the "Password to Open" is faded and I cannot enter a password.

Why can't I protect the workbook?


I want to unprotect my estimating workbook. My password works to open the workbook but doesn't work to unprotect the workbook.
(1) If I choose tools>Protection>unprotect workbook and then enter my password into the message box I get the message that the "password supplied is not correct". Somewhere along the line my password became corrupt.
(2) If I choose File>Save As and click General Options>Passwords to Open and highlight the asterisks then Delete then Click OK>Save>Yes to replace the existing workbook and then I close the workbook. When I reopen the workbook it is still protected.
How can I unprotect the workbook? My goal is to protect the Master copy of the Estimating Workbook with a password to open so others can’t open the Master Workbook and make changes. Then I want to open the Master Workbook and save a copy of the workbook with a specific project name without the protection. Then the estimators can use the project specific workbook without the password. Thanks for your help.


I want to unprotect my estimating workbook. My password works to open the
workbook but doesn't work to unprotect the workbook.
(1) If I choose tools>Protection>unprotect workbook and then enter my
password into the message box I get the message that the "password supplied
is not correct". Somewhere along the line my password became corrupt.
(2) If I choose File>Save As and click General Options>Passwords to Open and
highlight the asterisks then Delete then Click OK>Save>Yes to replace the
existing workbook and then I close the workbook. When I reopen the workbook
it is still protected.
How can I unprotect the workbook? My goal is to protect the Master copy of
the Estimating Workbook with a password to open so others can’t open the
Master Workbook and make changes. Then I want to open the Master Workbook and
save a copy of the workbook with a specific project name without the
protection. Then the estimators can use the project specific workbook without
the password. Thanks for your help.




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


Hello,

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?


I need a workbook to be viewed on a network, but only allow editing access to a few people. And I would like to have it password protected automatically

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/Protect (Unprotect sheet) Sheet, I need to re-enter the password for all sheets twice before the workbook closed.

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 or Saved As unless it is opened by an editor?


Hi all,
Is there a way of protecting the 'Save' function with a password in Excel 2003? VBA would be okay as I've got other code running as well, so I'm not in a restricted environment.

I don't mind users being able to open and browse the file, but after browsing around and changing selected-cell-positions Excel asks them if they want to Save the changes, and they invariably click Yes. The more they do this, the closer we get to accidental data alteration.

I've tried impressing upon them not to Save unless they've actually changed something, but.. y'know what end-users are like

So, I figure if I password protect the Save function and make it more difficult for them to Save, they'll just click 'No' unless they really need to. I'll give them the password as well, I'll just make it a pain-in-the-backside one to type in.

Any thoughts?

Many thanks in advance


how can i protect a macro enabled file with a password so that unless you enter the password no one can open that file...i have tried "save as" option and in the general tools i entered the password...but now the problem is when i open the password protected file...macros stop working...every time it says to enable the macro in security settings...i have already enabled them but it still doesn't work...i am using excel 2007 and i am trying to save this file in xlsm format...

help please


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.


I believe this is a bug in Excel 2003. I get an error when saving as
CSV with VBA password protection turned on. If I turn off password
protection, the same code runs without error.

To reproduce the problem...

1. Open a new Excel file.
2. Type "Test" in Sheet1 cell A1
3. using Excel's Control Toolbox toolbar, draw a button on the
worksheet
4. right click on the button and select "view code"
5. enter the following line of code in the button click event (be sure
to enter a path that exists on your system -- I used "c:\temp" which
did exist on my system):
ThisWorkbook.SaveAs "c:\temp\test.csv", xlCSVWindows
6. save your Excel file
7. click the button and observe that the VBA code runs without error
8. close the CSV file that you saved in step 7
9. re-open your Excel file that you saved in step 6
10. open the Visual Basic editor and select Tools\VBAProject Properties
from the menu
11. click the Protection tab, check the "Lock project for viewing"
checkbox, enter a password and click OK (this protects your VBA code).
12. close the Excel file
13. re-open the Excel file
14. click on the button you added in step 3 and notice the error.
"Run-time error '1004':
Method 'SaveAs' of object '_Workbook' failed
15. open the Visual Basic editor and attempt to view your code
16. when prompted for your password, enter it
17. click on the button you added in step 3 notice now the code runs
without error.

So it's clear that the same code runs fine when VBA password protection
is turned on or the password has been entered, or produces an error
when VBA password protection is turned off or the password has been
entered.

Any ideas how to correct this issue or work around it?

Thanks!




Hi,

I've done a search on this and think I know what I need to do but I'm after some confirmation and/or better method of doing this. Reason is it's an extremely important work doc and if I mess it up my head's on the chopping block

I have a workbook that is currently shared with availability for any user to edit and save. However, there will soon be many more users but I don't want these people to be able to update.

So my thinking is do a password protect to open and then a further password to edit. So far, no problems. I am then intending to share the workbook so the people with editor access can edit at any time.
I am doing this by having the workbook as unshared, then going File>Save As>Tools>General Options. I then share the workbook.

My problem seems to arise when this gets saved I get a message stating "Caution: You are attempting to save a workbook that is password protected". It then goes on to say about portions not being encryted.

Am I making this more difficult than it should be? Can someone advise as to the easiest way to share a workbook but only allow some users to edit?

Thanks in advance.


how can i protect a macro enabled file with a password so that unless you enter the password no one can open that file...i have tried "save as" option and in the general tools i entered the password...but now the problem is when i open the password protected file...macros stop working...every time it says to enable the macro in security settings...i have already enabled them but it still doesn't work...

help please


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.


The following code is what I have at this time to password protect an individual file when it is open.
When I run it it simply pops up a screen asking me to enter the password I want to protect the file with, I enter the file then click ok.
Code:

Sub Protect_sheets()
    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


What I'm looking for is a a code that instead when run I want to 1st prompt me to select a directory and once selected have a 2nd prompt asking me to enter the password of my choice then lastly open each file within the chosen directory, protect it using the password just entered and saved. Can anyone assist?


Hi there,

I have developed a excel workbook that is to be given to an external party and I need to lock it down as much as possible.

I have protected the cells/sheets by using Tools -> Protection, with a password the external party will not know.

I have also protected the workbook using Tools -> Options -> Security with a password to open, which the external party will know.

However I am still finding a few flaws in the protection, in that once the external party has logged in, they are able to go Tools -> Options -> Security themselves and remove the password.

AND, what is worse, they are able to go Tools -> Options -> View and they can click the 'Formulas' checkbox in the 'Window Options' section ... this is a major flaw in that even though the cells are locked and cannot be clicked in let alone view the formula inside them, by going through the tools menu anyone can essentially see the entire workings of the workbook.

Anyone with any experience or able to assist in this matter would be very much appreciated!


Code:

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 ?


Hi iwas wondering if anyone would know a reason for this problem.

I cannot seem to be able to password to modify an excel template. When i create a template save it and click on general options before saving, enter in a password to modify and click ok and save the template.

Then when i go into the template no pop-up appears asking me to enter a password. any ideas?


I have a workbook which will have sheets added everyday. The sheet template is protected so that only certain cells are editable. How can I copy the information on the sheet and paste on a new sheet but keep the new sheet protected? I would like the protection to happen automatically as other users will be copy and pasting in to new sheets but they won't know how to protect the sheet.

Thank you.

Is there a Module / Macro I can install that will automatically protect all worksheets upon save?
------------------------------------------

I found this answer in another post.. It works and answered my question.


The following macro cycless through all the worksheets in the active
workbook, protecting them and assigning the password of "Password"

Sub ProtectAll()

Dim wb As Workbook
Dim ws As Worksheet

Set wb = ActiveWorkbook

For Each ws In wb.Worksheets
ws.Protect DrawingObjects:=True, _
Contents:=True, Scenarios:=True, _
Password:="Password"
Next ws

Set wb = Nothing
Set ws = Nothing

End Sub

Place it in a VBA module by pressing Alt+F11, click INSERT on the menu and
select MODULE. You can either type the code above or cut and paste it. To
run the macro select TOOLS on the menu, click MACRO and then select MACROS.
The macro will be in the list of available macros. You can select it and
then click the RUN command button.
--
Kevin Backmann


I Just began using the Excel 2003 version. Whenever I password protect a sheet(s), and then attempt to save the workbook, the "unprotect sheet" password query pops up ... if you click cancel to bypass, another query comes up for each sheet that is password protected. I have workbooks that have 40 sheets password protected. When saving a document, how can I avoid having the password query pop each for each password protected sheet in the workbook?


Good Morning - this will probably seem like a rediculous question - but I can't seem to get it to work the way I need.

I have a large workbook - there are formulas in this workbook that I would like to hide, however do not want to use a password for the rest of the workbook. So, I can send it to anyone I like, and anyone would be able to open it - but the only way to view a formula would be to enter my password.

Second problem .... previously while trying to solve this issue I locked the workbook - must use password to open - when I open the workbook and go to tools and protection - it shows the workbook is not protected, but still prompts for a password upon opening it - this is NOT what I want, as many people have to see the spreadsheets - I just don't want them to see the fomulas which created the spreadsheet numbers.

In summary - I have a range of cells with formulas - which I would like to apprear blank for anyone to see without using a password - I would not be able to select users as there are to many unknown. Only when I type a password will these formulas become visible.

Lorie


Hi all,

I have this excel files protected by password and I need to unprotect it so
I go to Tools -> Protection -> Unprotect Sheet to unprotect my worksheet.
The password was right and the process went on correctly without any error
or problem.

but the next time I open the same file again, I was prompted to key in
password again. and I had to use the same password to go in.

When I check on the Tools -> Protection. The unprotect sheet change to
Protect sheet. which means by right it should be an unprotected file. but
why I was prompt for password ?

I suspected it is due to corrupted file content. but how to fix it ? or it
is something else.

Any help is very much appreciated.

Thanks and Regards,

Bernard Goh
Success Electronics & Transformer Manufacturer Sdn Bhd





Hi,

I'm hoping someone can help me here! I have an Excel document that is viewed by approximately 200 users. For obvious reasons I only want them to have read only access however I use and update the document regularly throughout the day.

Previously when the document was on Excel 2003 I would go to Tools/Options and select from there to add a Password to either Modify or Open.

I'm now using Excell 2007 and I can't seem to find the same function. I know there is one section when saving a document as "Save As" that will allow me to do this however I don't to have to create a new document every time I add a password. Likewise I know I can go onto my drive and right click the document to "Read Only" but this seems a bit of a clunky way round it rather than just adding a password.

The Microsoft help pages say to go to menus that don't exist so I'm a bit confused!!