K. Georgiadis
02-12-2005, 08:37 AM
Here I go again, wishing to expand the list of exceptions in the following code which I got here (from DRJ):
Public Sub ProtectAll()
Const PWORD As String = "MySecretWord"
Dim wsSheet As Worksheet
For Each wsSheet In Worksheets
wsSheet.Protect Password:=PWORD, DrawingObjects:=False, _
Contents:=True, Scenarios:=True, AllowFiltering:=True, _
AllowUsingPivotTables:=True, UserInterfaceOnly:=True, _
AllowFormattingCells:=True, AllowFormattingRows:=True
Next wsSheet
End Sub
I want to also allow inserting rows. I attempted AllowInsertingRows:=True and InsertingRows:=False, but neither works. Could you a lend a hand with this?
Is there a more convenient place to find these VBA expressions than in Microsoft's Online Help? I find it extremely difficult to find anything there.
Thanks for your help
Public Sub ProtectAll()
Const PWORD As String = "MySecretWord"
Dim wsSheet As Worksheet
For Each wsSheet In Worksheets
wsSheet.Protect Password:=PWORD, DrawingObjects:=False, _
Contents:=True, Scenarios:=True, AllowFiltering:=True, _
AllowUsingPivotTables:=True, UserInterfaceOnly:=True, _
AllowFormattingCells:=True, AllowFormattingRows:=True
Next wsSheet
End Sub
I want to also allow inserting rows. I attempted AllowInsertingRows:=True and InsertingRows:=False, but neither works. Could you a lend a hand with this?
Is there a more convenient place to find these VBA expressions than in Microsoft's Online Help? I find it extremely difficult to find anything there.
Thanks for your help