When I call Thisworkbook.Protect in VBA the protection of the workbook actually toggles from the current workbook's protection status instead of just protecting the workbook.
Thisworkbook.Unprotect doesn't do this though.
Anyone know why this is the case or how to get around it?
Not sure if it is by design or a bug... If you provide the parameters, it works fine:
or
Whichever you need/want. This way it won't turn the protection off, only on.
To turn the protection off, you can use this (assumning you only turned on structure protection):
Parameters are: