[RESOLVED] Excel change event not working
I am trying to have a macro run when a cell cell is changed to an integer value of 1, 2 or 3. When I am running the code the macro is running when I select a cell of value 1, 2 or 3 and not when changing the cell value. Any help is greatly appreciated.
Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Application.Intersect(Target, Range("C:M")) Is Nothing Then
If Target.Value > 0 And Target.Value < 4 Then
Call macro 'macro that should function
End If
End If
End Sub
Re: Excel change event not working
Try "Worksheet_Change" instead of "Worksheet_SelectionChange". SelectionChange triggers when you select something else. Change triggers when you change a cell.
Re: Excel change event not working
That is all that was needed. Thank you so much!