Colleen45
Active Member
- Joined
- Jul 22, 2007
- Messages
- 495
I have macro that is run when certain names are selected from a drop down list
However I don't want the users of this workbook having to enter a PW
Yet the PW is required for the macro to run, is there a way?
I recorded a macro where I entered the PW, and rentered it again just before the end of the macro to lock the worbook up again, yet when the macro runs it asks for the pw
How do I bypass this and still have the worked locked after running the Maco
This the recorded macro:
[bb]
Sub unhide_rows()
'
' unhide_rows Macro
'
'
ActiveSheet.Unprotect
ActiveWindow.DisplayHeadings = True
Rows("10:15").Select
Range("A15").Activate
Selection.EntireRow.Hidden = False
Rows("16:16").Select
Range("AD16").Activate
ActiveWindow.DisplayHeadings = False
Range("A19:D19").Select
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
End Sub
[/bb]
However I don't want the users of this workbook having to enter a PW
Yet the PW is required for the macro to run, is there a way?
I recorded a macro where I entered the PW, and rentered it again just before the end of the macro to lock the worbook up again, yet when the macro runs it asks for the pw
How do I bypass this and still have the worked locked after running the Maco
This the recorded macro:
[bb]
Sub unhide_rows()
'
' unhide_rows Macro
'
'
ActiveSheet.Unprotect
ActiveWindow.DisplayHeadings = True
Rows("10:15").Select
Range("A15").Activate
Selection.EntireRow.Hidden = False
Rows("16:16").Select
Range("AD16").Activate
ActiveWindow.DisplayHeadings = False
Range("A19:D19").Select
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
End Sub
[/bb]