Hello,
Is there an event that is triggered at the exact moment I exit Design Mode?
I looked for something like "Sub DesignMode_Deactivate()" in the events in the workbook list, but I couldn't find it...
Thanks.
Hello,
Is there an event that is triggered at the exact moment I exit Design Mode?
I looked for something like "Sub DesignMode_Deactivate()" in the events in the workbook list, but I couldn't find it...
Thanks.
I don't there is one.
If "Sub Worksheet_Activate()" worked when I left desing mode, it would do. But, the Activate only works if after the design mode I click on another sheet and then go back to the one that has the Activate.
That's because it is designed to run when you activate a sheet. Design Mode on or off will not trigger an event.
What do you need it for?
Thanks for the question, rory.
I have projects that need several constants loaded so that all requests while using the sheet are executed more quickly.
However, sometimes I need to change something in the VBA code, and after I do that it resets the project. And then all the constants are emptied, requiring several calculations and checks to be done to reload them.
I wanted the routine to load the constants to be re-executed as soon as I left the desing mode, understand?
Constants, by definition, can't lose their values, so I assume you are talking about public variables. Anyway, there is no way to do what you want that I know of. You'd need a commandbar listener, and that would be reset in the state loss, just like your other variables. If you have a routine to reset them, it's not really a hardship to run one routine yourself, is it?
Ok. How would I do a "commandbar listener"? Thank you.
Tnx.
Don’t have an account yet? Register yourself now and be a part of our community!