Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
On Change Event
Hi Group:
I created a macro to pop up a message box under certain conditions using the Workbook_Change property of a worksheet. However sometimes it seems to stop working. What could cause this? JJ |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
On Change Event
This will happen if worksheet events are left dis-abled.
Many Event macros disable events, do some processing, and then re-enable them before exiting. If the routine exits prematurally, the dis-able may be left in effect. -- Gary's Student "Jeanne Conroy" wrote: Hi Group: I created a macro to pop up a message box under certain conditions using the Workbook_Change property of a worksheet. However sometimes it seems to stop working. What could cause this? JJ |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
On Change Event
Hi Jeanne,
Just to add to Student's response, in order to prevent the observed behaviour, when events are disabled in the code, it is advisable to re-enable events in an error handler, e.g: '============= Private Sub Worksheet_SelectionChange(ByVal Target As Range) On Error GoTo XIT Application.EnableEvents = False 'your code XIT: Application.EnableEvents = True End Sub '<<============= --- Regards, Norman "Jeanne Conroy" wrote in message ... Hi Group: I created a macro to pop up a message box under certain conditions using the Workbook_Change property of a worksheet. However sometimes it seems to stop working. What could cause this? JJ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
MsgBox in Enter event causes combobox not to run Change event | Excel Programming | |||
Change event and calculate event | Excel Programming | |||
Change Cell from Validated List Not Firing Worksheet Change Event | Excel Programming | |||
change event/after update event?? | Excel Programming |