Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Worksheet events


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

--
agarwaldv
-----------------------------------------------------------------------
agarwaldvk's Profile: http://www.excelforum.com/member.php...fo&userid=1134
View this thread: http://www.excelforum.com/showthread.php?threadid=26595

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Worksheet events

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!).

--

HTH

RP

"agarwaldvk" wrote in message
...

Hi All

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

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

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

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


Best regards and thanks in advance!



Deepak Agarwal


--
agarwaldvk
------------------------------------------------------------------------
agarwaldvk's Profile:

http://www.excelforum.com/member.php...o&userid=11345
View this thread: http://www.excelforum.com/showthread...hreadid=265958



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Understand Workbook/Worksheet Events Zamdrist Excel Discussion (Misc queries) 4 August 10th 06 04:56 PM
Worksheet Events DCSwearingen Excel Discussion (Misc queries) 2 May 24th 06 10:42 PM
Worksheet events - when are they triggered! agarwaldvk[_31_] Excel Programming 1 September 28th 04 01:43 PM
Events for a Protected Worksheet jpendegraft[_18_] Excel Programming 2 September 6th 04 04:11 PM
Trapping Events generated by a Worksheet debartsa Excel Programming 3 November 28th 03 01:42 PM


All times are GMT +1. The time now is 03:52 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"