protecting workbook

J

jolowe

I need to protect several workbooks from being modified (to do this a sheet
at a time would take forever)- I want to password protect them - there is a
help entry for "set password to modify a workbook" but (and this is big but)
the information is NOT for Excel 2007 - it looks like 2003. This is what is
in the 2007 Excell Help and on the Excel Help on line. Is there any way to
do this in 2007??
 
J

JLatham

Start by opening Excel 2007 and clicking the ? (help) button. Do a search for
Password protect workbook
You'll find the information you need - note that the help topic it will
probably lead you to contains information for Excel, Word and PowerPoint.
Look at the ones for workbooks.

In short: [Office] Button, click "Save As" (not one of the choices in the
right-hand pane) and then choose [Tools] from the lower left of the Save As
window and then finally choose "General Options" and you'll be where I think
you want to be. You'll have a couple of options; one to encrypt and PW
protect the workbook and another to use a PW to restrict what users can do
with the workbook.
 
G

Gord Dibben

Sub ProtectAllSheets()
Application.ScreenUpdating = False
Dim N As Single
For N = 1 To Sheets.Count
Sheets(N).Protect Password:="justme"
Next N
Application.ScreenUpdating = True
End Sub

Sub UnprotectAllSheets()
Application.ScreenUpdating = False
Dim N As Single
For N = 1 To Sheets.Count
Sheets(N).Unprotect Password:="justme"
Next N
Application.ScreenUpdating = True
End Sub

Sub Protect_Selected_Sheets()
Set MySheets = ActiveWindow.SelectedSheets
For Each ws In MySheets
ws.Select
ws.Protect Password:="justme"
Next ws
End Sub


Gord Dibben MS Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top