View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Partho[_3_] Partho[_3_] is offline
external usenet poster
 
Posts: 8
Default Worksheet Change Event macro fails intermittently

My worksheet change event macro is like this:

Private Sub Worksheet_Change(ByVal Target As Range)
Dim n As Integer
Application.ScreenUpdating = False
Application.EnableEvents = False 'prevents change event indefinite loop

<Loop macro resets formulas in 20 rows in one column using counter n

Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub

The macro works sometimes but fails intermittently. This happens even if I
comment out the EnableEvents = False/True code.
Any ideas on why it could be failing and/or how I could investigate would be
appreciated, thanks.
--
Partho