Worksheet A has ranges of data that are collected from Worksheet B. Worksheet A has a macro that calculates if the data is above a value then calls an email module to email selected users.
When the data is manually input on Worksheet A the Macro works, however when data is pulled from Worksheet B it doesn't fire.
I'm not sure what I need to change in my VBA code.
Private Sub Worksheet_Change(ByVal Target As Range)
Call MailAlert(Target, "B5:M5", 4)
Call MailAlert(Target, "B8:M8", 7)
Call MailAlert(Target, "B11:M11", 6)
Call MailAlert(Target, "B14:M14", 2)
Call MailAlert(Target, "B17:M17", 4)
Call MailAlert(Target, "B20:M20", 1)
Call MailAlert(Target, "B23:M23", 3)
Call MailAlert(Target, "B26:M26", 1)
Call MailAlert(Target, "B29:M29", 5)
Call MailAlert(Target, "B32:M32", 1)
Call MailAlert(Target, "B35:M35", 7)
Call MailAlert(Target, "B38:M38", 20)
Call MailAlert(Target, "B41:M41", 0)
End Sub
Private Sub MailAlert(ByVal Target As Range, ByVal Address As String, ByVal Value As Integer)
If Target.Cells.Count > 1 Then Exit Sub
If Not Application.Intersect(Range(Address), Target) Is Nothing Then
If IsNumeric(Target.Value) And Target.Value > Value Then
Call Mail_small_Text_Outlook
End If
Application.EnableEvents = True
End If
End Sub
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…