F
Francis Hookam
A friend needs to protect a 20 sheet worksheet it seems to me that all
cells in each sheet need to be locked and then individual sheets protected
something like the unrefined and quickly recorded macro below
However, although I entered a password when protecting the sheet, none shows
up in the macro. I realise that someone could see the password within the
macro but the macro can be protected
Can you show me how to protect each sheet WITH a password? Thanks
Francis Hookham
Sub LockUp()
Count = 10
While Count > 0
Sheets("Sheet" & Count).Select
Cells.Select
Selection.Locked = True
Selection.FormulaHidden = True
Range("A1").Select
ActiveSheet.Protect DrawingObjects:=True, Contents:=True,
Scenarios:=True
ActiveSheet.EnableSelection = xlNoSelection
Count = Count - 1
Wend
End Sub
cells in each sheet need to be locked and then individual sheets protected
something like the unrefined and quickly recorded macro below
However, although I entered a password when protecting the sheet, none shows
up in the macro. I realise that someone could see the password within the
macro but the macro can be protected
Can you show me how to protect each sheet WITH a password? Thanks
Francis Hookham
Sub LockUp()
Count = 10
While Count > 0
Sheets("Sheet" & Count).Select
Cells.Select
Selection.Locked = True
Selection.FormulaHidden = True
Range("A1").Select
ActiveSheet.Protect DrawingObjects:=True, Contents:=True,
Scenarios:=True
ActiveSheet.EnableSelection = xlNoSelection
Count = Count - 1
Wend
End Sub