I have a workbook that uses workbook protection
Code: Select all
ActiveWorkbook.Protect Password:="", Structure:=True, Windows:=True
and sheet protection
Code: Select all
Sheets("Sheet1").Protect DrawingObjects:=False, Contents:=True, Scenarios:=True, _
Password:="", UserInterfaceOnly:=True
The problem I seem to be having is, when I save the workbook and then close, when I reopen the workbook, which first opens to a userform, from there I select a command button that only unloads the userform, now from there if I try to continue where I left off I have to unprotect each and every sheet before using a checkbox or a command button attached to code. Is there any type of code I could add with the unload userform code that can correct this