I am using VBA to check a value of a cell and call an email module to email if the cell's value is more than a value.
I want to check multiple cells but understand that it is not possible to have two Private Sub Worksheet_Change in VBA. What is the best way to check multiple cells?
Here is the code I am using;
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Not Application.Intersect(Range("A1"), Target) Is Nothing Then
If IsNumeric(Target.Value) And Target.Value > 10 Then
Call Mail_small_Text_Outlook
End If
End If
End Sub
Here is another if possible I would like to combine into the one Sub
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Not Application.Intersect(Range("B1"), Target) Is Nothing Then
If IsNumeric(Target.Value) And Target.Value > 20 Then
Call Mail_small_Text_Outlook
End If
End If
End Sub
If Not Application.Intersect...blocks into the same Sub, one after the other? - andy holaday