I'm trying to loop the below macro so it will repeat the function for each rom individually. Below is the code that works for a single row. Below that is my attempt at looping that keeps coming back with a DO without Loop error. Any insight would be great. Thanks.
Working Macro
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Not Application.Intersect(Range("v2"), Target) Is Nothing Then
If IsNumeric(Target.Value) Then
If Target.Value > 200 Then
Call Mail_small_Text_Outlook
End If
End If
End If
If Target.Cells.Count > 1 Then Exit Sub
If Not Application.Intersect(Range("v2"), Target) Is Nothing Then
If IsNumeric(Target.Value) And Target.Value > 200 Then
Call Mail_Customer_Text_Outlook
End If
End If
If Target.Cells.Count > 1 Then Exit Sub
If Not Application.Intersect(Range("ac2"), Target) Is Nothing Then
If Range("ac2").Value = "delivered" Then
Call Mail_delivery_Text_Outlook
End If
End If
End Sub
My failed attempt at looping
Private Sub Worksheet_Change(ByVal Target As Range)
Dim RowNum As Integer
rowz = Range("v2")
RowNum = 2
Do Until RowNum = rowz + 1
If Target.Cells.Count > 1 Then Exit Sub
If Not Application.Intersect(Range("v2"), Target) Is Nothing Then
If IsNumeric(Target.Value) Then
If Target.Value > 200 Then
Call Mail_small_Text_Outlook
Loop
End If
End If
End Sub
Bookmarks