With a trigger like a check box I want to protect my work book. I tried Excel 2003:
thisworkbook.protect(\"password\",true,true)
thisworkbook.unprotect(\"pa
To lock whole workbook from opening, Thisworkbook.password option can be used in VBA.
If you want to Protect Worksheets, then you have to first Lock the cells with option Thisworkbook.sheets.cells.locked = True and then use the option Thisworkbook.sheets.protect password:="pwd".
Primarily search for these keywords: Thisworkbook.password or Thisworkbook.Sheets.Cells.Locked