![]() |
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 |
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 |
All times are GMT +1. The time now is 08:20 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com