View Single Post
  #9   Report Post  
Chip Pearson
 
Posts: n/a
Default

Open the VBA Editor, and go to the Insert menu and choose Module
(not Class Module). Paste the code in to that module. Then you
can run the macro from the Macros dialog in Excel (ALT+F8).


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"CheriT63" wrote in message
...
Hi Chip,

Thank you for your reply! I know how to get in to VB editor.
Do I just
copy and paste this with minor changes (worksheet #s; unprotect
or protect)?
How do I run it then?

Thanks

"Chip Pearson" wrote:

Only with a VBA macro:

Sub ProtectSheets()
Dim WS As Worksheet
For Each WS In Worksheets
WS.Protect ' or .Unprotect
Next WS
End Sub


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com





"CheriT63" wrote in
message
...
I find it tedious to have to unprotect each worksheet
individually when I
need to edit or update a spreadsheet. The same is true when
I
want to
protect them again. Isn't there some way to do all
worksheets
at the same
time?

Protecting the workbook as a whole is not a workable
solution.
It restricts
things I don't want to restrict.