mlagrange
asked on
Getting "Object variable...not set" on ActiveWorkbook after "Enable Editing"
Hello - in the Workbook_Open event, I do some initialization things like protecting the workbook, protect the individual worksheets, and hide some columns on a data input worksheet.
I was ready to roll this out, but when I changed the workbook file name, the first time opening it, everything stopped until I answered the prompt about "Enable Editing". After I click that button, then I get the Object variable... not set".
Shouldn't ActiveWorkbook always be set?
Thanks
I was ready to roll this out, but when I changed the workbook file name, the first time opening it, everything stopped until I answered the prompt about "Enable Editing". After I click that button, then I get the Object variable... not set".
Shouldn't ActiveWorkbook always be set?
Thanks
what line of code triggers the error?
ASKER
ActiveWorkbook..Unprotect Password = strMyPassword
I unprotect the workbook first in case it is still protected, so I can hide tabs that may or may not be hidden.
strMyPassword is Dim'd as: Global Const strMyPassword as string = ...
I unprotect the workbook first in case it is still protected, so I can hide tabs that may or may not be hidden.
strMyPassword is Dim'd as: Global Const strMyPassword as string = ...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Ok, thanks, that explains it. As it turns out, I'm lucky; this thing will live on SharePoint, and it doesn't have this problem opening up from there.
Thanks again
Thanks again