workbook protection

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

Mike H

Not sure where this goes in 2007 but in 2003 right click the sheet tab, view
code paste it in and run it

Sub protectem()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
ws.Protect Password:="Mypass"
Next ws
End Sub

Mike
 
M

Mike Fogleman

This would be in the "SaveAs" properties for the workbook. There are 2
options: WriteResPassword and Read Only. WriteResPassword will let you
modify if you give the password. Read Only will not let anyone modify it.
The only way would be to save the file as a different name, modify it, and
then saveas the original book name, or over-write the read-only book.

Mike F
 
S

Shane Devenshire

Hi,

You can also get to the proper location in 2003 by choosing Tools, Options,
Security and enter a Password to Modify.

Cheers,
Shane Devenshire
Microsoft Excel MVP
Join http://setiathome.berkeley.edu/ and download a free screensaver to help
search for life beyond earth.
 

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

Similar Threads

protecting workbook 2
Excel Protection 2
Macro error when trying to open workbook 6
protection ?? 5
links in protected workbooks 2
Workbook protection 8
Userinterfaceonly 5
forgotten password (tab) 3

Top