S
Steve Klenner
This macro used to work...I am now using Excel 2003....it appears to fail at
line ... sht.Protect password="lock"
I want to be able to select certain sheets within a workbook and protect
them with a password.
I'd like to have a subsequent macro that would do the opposite....select
same sheets and un-protect them.
*******************************
Sub ProtectAllSheets()
Sheets("Sheet1").Select
Sheets("Sheet2").Select
Sheets("Sheet9").Select
Sheets("Sheet11").Select
For Each sht In Sheets
sht.Protect Password:="lock"
Next sht
End Sub
*******************************
Thanks
Steve
line ... sht.Protect password="lock"
I want to be able to select certain sheets within a workbook and protect
them with a password.
I'd like to have a subsequent macro that would do the opposite....select
same sheets and un-protect them.
*******************************
Sub ProtectAllSheets()
Sheets("Sheet1").Select
Sheets("Sheet2").Select
Sheets("Sheet9").Select
Sheets("Sheet11").Select
For Each sht In Sheets
sht.Protect Password:="lock"
Next sht
End Sub
*******************************
Thanks
Steve