Event Procedure (re-activate automatic calulation if disabled)

G

Guest

I need an event procedure activate “Application.Calculation = xlAutomaticâ€
whenver the targeted sheets are selected. I have 10 worksheets in my workbook
where the event procedure should only affect Sheet1 to Sheet6

Purpose:
This is to ensure “Application.Calculation = xlAutomatic†is always
activated even when my other procedures in Module1 exits pre-maturely as I
disable calculation via “Application.Calculation = xlManual†at the beginning
of each procedure within Module1 (for speed). So, if my codes in Module1
exits pre-maturely (due to poor debugging), atleast I have the event to
reactivate “Application.Calculation = xlAutomatic†whenver the targeted
sheets are selected.

Also, pls tell me where should I place this event procedure. in Thisworkbook
or where?

Thanks in advance.
 
N

NickHK

Edmund,
Each sheet has a _Activate & _Deactivate events you can respond to.
Or ThisWorkbook has _SheetActivate if you want one central place for code.

NickHK
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top