LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,939
Default Protecting more than one worksheet at a time

Nothing built in but you can do it with a fairly simple macro. I have created
an addin for myself with the code in it to make it easy to do...

Public Sub ProtectAll()
Dim wks As Worksheet
Dim wksAll As Sheets

Application.ScreenUpdating = False
If ActiveWindow.SelectedSheets.Count 1 Then
Set wksAll = ActiveWindow.SelectedSheets
Else
Set wksAll = ActiveWorkbook.Worksheets
End If
On Error Resume Next
For Each wks In wksAll
Select Case Trim(wks.Name)
Case "Start" 'excluded sheet
Case "Main" 'excluded sheet
Case Else
wks.Protect "MyPassword"
End Select
Next wks
Application.ScreenUpdating = True
End Sub
--
HTH...

Jim Thomlinson


"Donnah" wrote:

Is there any way to protect more than one worksheet at a time without have to
right click on each worksheets tab and choose 'Protect Sheet'?


 
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
Protecting and Unprotecting several worksheets at one time Learning Excel Excel Discussion (Misc queries) 8 February 4th 09 10:07 PM
Protecting worksheet Kimti Excel Worksheet Functions 1 July 6th 08 01:37 AM
Protecting Multiple Worksheets at the same time Doug P. Excel Worksheet Functions 1 September 20th 07 02:48 AM
Un-Protecting a Worksheet Lauren Giles Excel Discussion (Misc queries) 2 February 7th 07 11:46 PM
Using subtotaling and protecting a sheet at the same time Wayne Excel Worksheet Functions 1 January 13th 06 05:28 PM


All times are GMT +1. The time now is 06:10 AM.

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

About Us

"It's about Microsoft Excel"