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 |
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 |
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 |
All times are GMT +1. The time now is 08:49 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com