Welcome to VBA Tips & Tricks. All VBA related information will be posted on this blog. Of late, VBA has been disregarded by many software professionals for .Net, c# and other technologies. This blog will also post articles related to them too Happy reading
Monday, April 12, 2010
Prevent endless loops within events:
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
On Error GoTo ResetEvents
Application.EnableEvents = False
'Your code here.
Application.EnableEvents = True
Exit Sub
ResetEvents:
Application.EnableEvents = True
End Sub
No comments:
Post a Comment