Hi,
I have recorded the following macro to protect my different worksheets. Unfortunately, it just protects the worksheets without asking for the password. How am I able to add the password to my recorded macro?
Thank you in advance for your help.
Roman
Recorded macro:
Sub protectall()
'
' protectall Macro
' Macro recorded 01-02-2012 by RomanGraber
'
'
Sheets("Baseline overview list").Select
Cells.Select
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowSorting:=True, AllowFiltering:=True, AllowUsingPivotTables:=True
Sheets("Options").Select
Cells.Select
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
Range("B2").Select
Sheets("Management").Select
Cells.Select
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
Range("A1").Select
Sheets("Overview").Select
End Sub
I have recorded the following macro to protect my different worksheets. Unfortunately, it just protects the worksheets without asking for the password. How am I able to add the password to my recorded macro?
Thank you in advance for your help.
Roman
Recorded macro:
Sub protectall()
'
' protectall Macro
' Macro recorded 01-02-2012 by RomanGraber
'
'
Sheets("Baseline overview list").Select
Cells.Select
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowSorting:=True, AllowFiltering:=True, AllowUsingPivotTables:=True
Sheets("Options").Select
Cells.Select
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
Range("B2").Select
Sheets("Management").Select
Cells.Select
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
Range("A1").Select
Sheets("Overview").Select
End Sub