Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
change event
I have the following code in a worksheet change event:
Private Sub Worksheet_Change(ByVal Target As Range) On Error GoTo stoppit Application.EnableEvents = False enteritem Application.EnableEvents = True stoppit: End Sub It was working until I made some changes in the 'enteritem' procedure and now nothing happen. I've put 'msgbox("")' in and nothing happens in this worksheet or an anyother worksheets. How do I get them to work again? Thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
change event
It appears you need to set EnableEvents back to True... '-- Sub ReturnToNormal Application.EnableEvents = True End Sub Also, in your procedure, place the stoppit: line above the Application.EnableEvents = True line. Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware (Excel Add-ins / Excel Programming) "ranswert" wrote in message I have the following code in a worksheet change event: Private Sub Worksheet_Change(ByVal Target As Range) On Error GoTo stoppit Application.EnableEvents = False enteritem Application.EnableEvents = True stoppit: End Sub It was working until I made some changes in the 'enteritem' procedure and now nothing happen. I've put 'msgbox("")' in and nothing happens in this worksheet or an anyother worksheets. How do I get them to work again? Thanks |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
change event
thanks I'll give it a try
"Jim Cone" wrote: It appears you need to set EnableEvents back to True... '-- Sub ReturnToNormal Application.EnableEvents = True End Sub Also, in your procedure, place the stoppit: line above the Application.EnableEvents = True line. Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware (Excel Add-ins / Excel Programming) "ranswert" wrote in message I have the following code in a worksheet change event: Private Sub Worksheet_Change(ByVal Target As Range) On Error GoTo stoppit Application.EnableEvents = False enteritem Application.EnableEvents = True stoppit: End Sub It was working until I made some changes in the 'enteritem' procedure and now nothing happen. I've put 'msgbox("")' in and nothing happens in this worksheet or an anyother worksheets. How do I get them to work again? Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I change a Worksheet_change event to a beforesave event? | Excel Programming | |||
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 |