protect sheet in VB
Hi,
I want to use the below line lock a sheet
ActiveSheet.Protect DrawingObjects:=True, Contents:=True,
Scenarios:=True
and assign a password.
then the macro will hide the sheet.
ActiveWindow.SelectedSheets.Visible = False
Another Macro will unhide the sheet and then unlock it
with a password prompt.
ActiveWindow.SelectedSheets.Visible = False
ActiveSheet.Unprotect
but this does not work. I cannot assign a password on
protecting.
any ideas?
|