Jaspal
06-28-2013, 03:44 AM
Hello there,
I have the following that protects my spreadsheet, but allows users to delete certain rows. I want the users to be able to group and ungroup certain columns that I have grouped already - so that it can be printed on A4. I
tweaked my code and added "EnableOutlining:=true", after "UserInterfaceOnly:=True, AllowDeletingRows:=True", but it does not work.
Thank you in advance,
Public Sub ProtectSheet(sWhichSheet)
' This Macro protects the Sheet
If Sheets(sWhichSheet).ProtectContents = False Then
Sheets(sWhichSheet).Protect Password:=sProtectionPassword, DrawingObjects:=True, Contents:=True, Scenarios:=True, UserInterfaceOnly:=True, AllowDeletingRows:= _
True
End If
End Sub
I have the following that protects my spreadsheet, but allows users to delete certain rows. I want the users to be able to group and ungroup certain columns that I have grouped already - so that it can be printed on A4. I
tweaked my code and added "EnableOutlining:=true", after "UserInterfaceOnly:=True, AllowDeletingRows:=True", but it does not work.
Thank you in advance,
Public Sub ProtectSheet(sWhichSheet)
' This Macro protects the Sheet
If Sheets(sWhichSheet).ProtectContents = False Then
Sheets(sWhichSheet).Protect Password:=sProtectionPassword, DrawingObjects:=True, Contents:=True, Scenarios:=True, UserInterfaceOnly:=True, AllowDeletingRows:= _
True
End If
End Sub