ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   run procedure when exit design mode (https://www.excelbanter.com/excel-discussion-misc-queries/149726-run-procedure-when-exit-design-mode.html)

Wim SKW

run procedure when exit design mode
 
Hi,

I have some procedures with static variables like "blnInitDone" to prevent a
very large and time-consuming piece of code to run more than once. These
procedures are typically called when opening the workbook.
Now every time I enter and exit design mode, these variables lose their
value so the large piece of code gets run again (which isn't necessary).

Is there any way to make a procedure run automatically whenever I exit
design mode as to initialise the values correctly? Or to link a macro to the
"Exit Design Mode" button (but then I guess you have to be able to determine
whether you're already in desing mode or not, otherwise the macro also gets
run when you enter design mode...)

Thanks.
-=Wim=-

Wim SKW

run procedure when exit design mode
 
Oops - I reposted this one in "Excel Programming" because it shouldn't have
been posted here... It's not a General Question.
Please reply to the other post.


All times are GMT +1. The time now is 02:29 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com