Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 177
Default protect/unprotect grouped worksheets

Hi, I have these macro's below that protect/unprotect all worksheets in the
book. How do I get them to only work on the sheets I selected?

TIA

Todd


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

Sub UnprotectAll()
Dim ws As Worksheet
For Each ws In Worksheets
ws.Unprotect Password:=""
Next ws
End Sub
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Protect/Unprotect Multiple Worksheets Katherine R Excel Discussion (Misc queries) 2 May 9th 06 04:07 PM
unprotect/protect grouped worksheets in excel mcwhirter Setting up and Configuration of Excel 1 August 8th 05 01:21 AM
Protect/unprotect all worksheets Janna Excel Worksheet Functions 2 January 7th 05 01:01 AM
protect / unprotect worksheets using VBA ExcelUserinPA Excel Programming 2 November 1st 03 03:36 PM
Macro to protect/unprotect worksheets Cameron[_3_] Excel Programming 2 August 6th 03 10:31 PM


All times are GMT +1. The time now is 01:09 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"