Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 161
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 161
Default 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
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
How do I change a Worksheet_change event to a beforesave event? Tueanker Excel Programming 5 June 29th 07 03:00 PM
MsgBox in Enter event causes combobox not to run Change event Richard Excel Programming 0 March 6th 06 02:52 PM
Change event and calculate event Antje Excel Programming 1 March 29th 05 09:03 PM
Change Cell from Validated List Not Firing Worksheet Change Event [email protected] Excel Programming 3 October 4th 04 03:00 AM
change event/after update event?? scrabtree23[_2_] Excel Programming 1 October 20th 03 07:09 PM


All times are GMT +1. The time now is 10:32 AM.

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

About Us

"It's about Microsoft Excel"