View Single Post
  #2   Report Post  
Trevor Shuttleworth
 
Posts: n/a
Default

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