Protecting and Unprotecting more than 1 worksheets
Sub Protect_Some_Sheets()
Application.ScreenUpdating = False
Dim N As Single
For N = 1 To 4
'for all sheets use N = 1 to Sheets.Count
Sheets(N).Protect Password:="justme"
Next N
Application.ScreenUpdating = True
End Sub
Gord Dibben MS Excel MVP
On Mon, 7 Jul 2008 14:36:55 -0700 (PDT), Jeffrey wrote:
Hi all. Is it possible to protect and unprotect more than 1
worksheets. Say the first 4 worksheet in a workbook using VBA codes?
Thanks much.
Jeff
|