Hi guys
I want to have a macro that protects the active sheet, but still allows other macros/vba to edit the sheet i.e. only the user is restricted in terms of protection. The ffg is the code I've written however, it fails when another macro/vba attempts to edit the sheet
Sub ProtectSheet()
ActiveSheet.Protect Password:="ria", UserInterfaceOnly:=True
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowFormattingCells:=True, AllowFormattingColumns:=True, _
AllowFormattingRows:=True, AllowSorting:=True
ActiveSheet.EnableSelection = xlNoRestrictions
End Sub
Any ideas?
I want to have a macro that protects the active sheet, but still allows other macros/vba to edit the sheet i.e. only the user is restricted in terms of protection. The ffg is the code I've written however, it fails when another macro/vba attempts to edit the sheet
Sub ProtectSheet()
ActiveSheet.Protect Password:="ria", UserInterfaceOnly:=True
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowFormattingCells:=True, AllowFormattingColumns:=True, _
AllowFormattingRows:=True, AllowSorting:=True
ActiveSheet.EnableSelection = xlNoRestrictions
End Sub
Any ideas?