Protecting and Unprotecting more than 1 worksheets
On Jul 8, 1:36*am, 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
it is very simple. loop through the sheets protecting each one in turn
Eg:
Sub Doit()
i = 1
Do Until i = 4
Sheets(i).Activate
ActiveSheet.Protect
i = i + 1
Loop
End Sub
End Sub
|