Workbook Protection

  • Thread starter Thread starter John
  • Start date Start date
J

John

I have created a workbook with 5 different worksheets.
In each worksheet I have hidden certain rows. I want to
be able to protect the hidden rows so that they can not
be unhidden. Is there a way to protect the workbook so
the rows are hidden without doing each sheet
individually? I tried to use the Protect Workbook
feature but when I tested it did not work. any help
would be appreciated.

Thanks,

John
 
Not manually.

You could have a macro that cycles through the worksheet and protects each of
them, though.

Option Explicit
Sub protectAll()
Dim wks As Worksheet
For Each wks In ActiveWorkbook.Worksheets
wks.Protect Password:="hi there!"
Next wks
End Sub

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm
 

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

Back
Top