Soleblue
New Member
Good evening everyone,
sorry for the terrible English.
I have this "Protect" macro that protects all my sheets, and it works perfectly.
Private Sub Protect()
For Sheets = 1 To ActiveWorkbook.Worksheets.Count
Sheets(Sheets).Protect Password:="pippo"
Next
End Sub
I'd like to add the "Format Cells" function.
I tried using the auto-help feature, but it it's very long. I only included 3 sheets in the example.
Sub Macro1()
'
' Macro1 Macro
Sheets("Mike").Select
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowFormattingCells:=True
Sheets("Andrea").Select
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowFormattingCells:=True
Sheets("Alex").Select
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowFormattingCells:=True
End Sub
Is there a function I can add to my macro above that also formats the cells? (keeping the password)
Using 365 Italian
Thanks for your help
Grazie
sorry for the terrible English.
I have this "Protect" macro that protects all my sheets, and it works perfectly.
Private Sub Protect()
For Sheets = 1 To ActiveWorkbook.Worksheets.Count
Sheets(Sheets).Protect Password:="pippo"
Next
End Sub
I'd like to add the "Format Cells" function.
I tried using the auto-help feature, but it it's very long. I only included 3 sheets in the example.
Sub Macro1()
'
' Macro1 Macro
Sheets("Mike").Select
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowFormattingCells:=True
Sheets("Andrea").Select
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowFormattingCells:=True
Sheets("Alex").Select
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowFormattingCells:=True
End Sub
Is there a function I can add to my macro above that also formats the cells? (keeping the password)
Using 365 Italian
Thanks for your help
Grazie