worksheet code
Thanks Sandy.
Wouldn't want to exit without re-enabling events.
Revised version......................
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
On Error GoTo stoppit
Application.EnableEvents = False
If Not Intersect(Target, Me.Range("A1")) Is Nothing Then
With Target
If .Value < "" Then
Sheets("Sheet2").Cells(Rows.Count, "A").End(xlUp) _
.Offset(1, 0).Value = Target.Value
End If
End With
End If
stoppit:
Application.EnableEvents = True
End Sub
Gord
On Fri, 4 Jan 2008 11:38:11 -0000, "Sandy Mann"
wrote:
I think that Gord may have meant to put the
Application.EnableEvents = False
line after the
If Intersect(Target, Me.Range("A1")) Is Nothing Then Exit Sub
line otherwise if the *If* line causes the sub to terminate then Events will
still be disabled.
|