You should disable events within the Change event before making any
changes. Otherwise, the Change event makes a change, that triggers
Change, which makes a change that triggers Change, as so on until you
run out of stack space.
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
'''
' code
'''
Application.EnableEvents =True
End Sub
Cordially,
Chip Pearson
Microsoft MVP
Excel Product Group
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)
On Thu, 20 Nov 2008 22:13:00 -0800, ryguy7272
<(E-Mail Removed)> wrote:
>Right click on the sheet of interest; paste this code into the window that
>opens:
>
>Private Sub Worksheet_Change(ByVal Target As Range)
>If Target.Column = 1 And Target.Row >= 1 Then
> Range("A1", Range("A1").End(xlDown)).Select
> Selection.Sort Key1:=Range("A1"), Order1:=xlAscending, Header:=xlGuess, _
> OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
>End If
>End Sub
>
>May need a bit of modifying, btu this should be pretty darn close...
>
>Regards,
>Ryan---