Re: Application Enable Events?
I found the error which was causing the problem so it isn't an issue now.
However, you bring up an interesting point with the positioning of where to disable events.
The reason that I have to disable events is that the code is triggered by a change to the worksheet. I disable the events while the code is executing to stop the changes that it makes calling the procedure again. I think this is the right thing to do???!
Some sample code:
Private Sub Worksheet_Change(ByVal Target As Range) Dim CreationFlag As Integer If Application.ScreenUpdating = True Then Application.ScreenUpdating = False Else CreationFlag = 1 ' Used to stop screenupdating being turned on at end of code due to creation of subreport being run. Exit Sub End If 'Do nothing if more than one cell is changed or content deleted If Target.Cells.Count > 1 Or IsEmpty(Target) Then Exit Sub If Not Intersect(Target, Range("F3,I3,K3")) Is Nothing Then 'Ensure target is a number before multiplying by 2 'If IsNumeric(Target) Then 'Stop any possible runtime errors and halting code On Error Resume Next 'Turn off ALL events so the Target * 2 does not _ put the code into a loop. Application.EnableEvents = False