Home |
Search |
Today's Posts |
#1
|
|||
|
|||
macro for protection
I recorded a macro to protect a sheet and then then workbook - and I input a
password. The recorded macro protects both the sheet and workbook - but doesnt use a password. Is there a syntax to use to protect them with a password ? This is my code for recording the macro. Application.CutCopyMode = False ActiveWorkbook.Protect Structu=True, Windows:=False Thanks, Yosef |
#2
|
|||
|
|||
Yosef
lookup Protect in the VBA Help ActiveSheet.Protect Password:=drowssap ActiveWorkbook.Protect Password:=drowssap ThisWorkbook.Protect Password:=drowssap Regards Trevor "ynissel" wrote in message ... I recorded a macro to protect a sheet and then then workbook - and I input a password. The recorded macro protects both the sheet and workbook - but doesnt use a password. Is there a syntax to use to protect them with a password ? This is my code for recording the macro. Application.CutCopyMode = False ActiveWorkbook.Protect Structu=True, Windows:=False Thanks, Yosef |
#3
|
|||
|
|||
Im not a programmer so the help was a bit too confusing for me.
Ill copy in your syntax and see what happens. I assume drowssap is your actual password ? Thanks "Trevor Shuttleworth" wrote: Yosef lookup Protect in the VBA Help ActiveSheet.Protect Password:=drowssap ActiveWorkbook.Protect Password:=drowssap ThisWorkbook.Protect Password:=drowssap Regards Trevor "ynissel" wrote in message ... I recorded a macro to protect a sheet and then then workbook - and I input a password. The recorded macro protects both the sheet and workbook - but doesnt use a password. Is there a syntax to use to protect them with a password ? This is my code for recording the macro. Application.CutCopyMode = False ActiveWorkbook.Protect Structu=True, Windows:=False Thanks, Yosef |
#4
|
|||
|
|||
Needs to be in quotes if it is the actual password ... my omission. Unless
you have a variable called drowssap with your password in it. Yes, I'm sure the help on this used to be more simple than it is now. Regards Trevor "ynissel" wrote in message ... Im not a programmer so the help was a bit too confusing for me. Ill copy in your syntax and see what happens. I assume drowssap is your actual password ? Thanks "Trevor Shuttleworth" wrote: Yosef lookup Protect in the VBA Help ActiveSheet.Protect Password:=drowssap ActiveWorkbook.Protect Password:=drowssap ThisWorkbook.Protect Password:=drowssap Regards Trevor "ynissel" wrote in message ... I recorded a macro to protect a sheet and then then workbook - and I input a password. The recorded macro protects both the sheet and workbook - but doesnt use a password. Is there a syntax to use to protect them with a password ? This is my code for recording the macro. Application.CutCopyMode = False ActiveWorkbook.Protect Structu=True, Windows:=False Thanks, Yosef |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Make Alignment options under format cells available as shortcut | Excel Discussion (Misc queries) | |||
Help with macro looping and color query function | Excel Discussion (Misc queries) | |||
Playing a macro from another workbook | Excel Discussion (Misc queries) | |||
Date macro | Excel Discussion (Misc queries) | |||
Macro and If Statement | Excel Discussion (Misc queries) |