Worksheet events

A

agarwaldvk

Hi All

I have a workbook with multiple worksheets in it. Some of th
worksheets sometimes require the events to be disabled. For thi
purpose, I have created a worksheet level activate procedure to giv
the users the option to disable the events should they feel the need t
do so.

However, there is a need that the events be turned back on once th
sheet that the user had been working on has been deactivated. Th
reason for the events to be enabled again is that the user may switc
over to one of those worksheets that requires the events to b
enabled.

Hence my problem is that once the events have been disabled whilst th
user is working on a particular worksheet, how do I get to run tha
worksheet's sheet deactivate event. From what I know, that won't happe
since the events have already been disabled.

So, with the events disabled, is there any way (or get around) that
could use to enable events as the worksheet is deactivated?


Best regards and thanks in advance!



Deepak Agarwa
 
B

Bob Phillips

You have a real problem there, events are disabled, so you won't fire when
they deactivate.

Try a different approach. Rather than disable events, create a global
Boolean, and when the user says yes to disabling, set that to False. In your
event code, check it, and exit if false. When they deactivate, set it back
to true (but tell them!).
 

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