ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Protecting Sheets - Excel 2000 (https://www.excelbanter.com/excel-discussion-misc-queries/149792-protecting-sheets-excel-2000-a.html)

LPS

Protecting Sheets - Excel 2000
 
Is it possible to protect more than one sheet at a time using Excel 2000?
--
LPS

Gord Dibben

Protecting Sheets - Excel 2000
 
Only through VBA code.

Sub ProtectAllSheets()
Application.ScreenUpdating = False
Dim n As Single
For n = 1 To Sheets.Count
Sheets(n).Protect Password:="justme"
Next n
Application.ScreenUpdating = True
End Sub

Sub UnprotectAllSheets()
Application.ScreenUpdating = False
Dim n As Single
For n = 1 To Sheets.Count
Sheets(n).Unprotect Password:="justme"
Next n
Application.ScreenUpdating = True
End Sub

For just the selected sheets.................

Sub Protect_Selected_Sheets()
Set MySheets = ActiveWindow.SelectedSheets
For Each ws In MySheets
ws.Select
ws.Protect Password:="justme"
Next ws
End Sub


Gord Dibben MS Excel MVP

On Wed, 11 Jul 2007 09:38:06 -0700, LPS wrote:

Is it possible to protect more than one sheet at a time using Excel 2000?




All times are GMT +1. The time now is 12:13 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com