hi
this part of my code sends a message once a column is changed.
how and where do i edit my code to iferror or on error exit
if there is no email address listed in (Cells(Target.Row, "Z").Value) or (Cells(Target.Row, "AA").Value)
this part of my code sends a message once a column is changed.
how and where do i edit my code to iferror or on error exit
if there is no email address listed in (Cells(Target.Row, "Z").Value) or (Cells(Target.Row, "AA").Value)
VBA Code:
If result = vbOK Then
Set OutlookApp = CreateObject("Outlook.Application")
Set OlObjects = OutlookApp.GetNamespace("MAPI")
Set newmsg = OutlookApp.CreateItem(olMailItem)
newmsg.Recipients.Add (Cells(Target.Row, "Z").Value) ' Add Recipients
newmsg.Recipients.Add (Cells(Target.Row, "AA").Value)
newmsg.Subject = Cells(Target.Row, "B").Value & " Reimbursement" ' Add Subject
newmsg.Body = "This is to inform you that payment has been processed " ' Email Body
newmsg.Display 'Display Email
newmsg.Send 'Send Email
Last edited by a moderator: