hi
this is my message
it works great
i want to add with the same action 2 different emails to 2 different recipients meaning the same ok will send 2 different messages
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count = 1 Then
If Target.Column = 9 Then
If Cells(Target.Row, "I").Value <> "" Then
result = MsgBox("pressing OK will send email to notify", vbOKCancel + vbInformation, "Budget Approved")
If result = vbCancel Then SaveUI = True
If result = vbOK Then
Set OutlookApp = CreateObject("Outlook.Application")
Set OlObjects = OutlookApp.GetNamespace("MAPI")
Set newmsg = OutlookApp.CreateItem(olMailItem)
newmsg.Recipients.Add ("mail@mail.org")
newmsg.Subject = Cells(Target.Row, "A").Value & " budget was approved" ' Add Subject
newmsg.Body = "Now that budget was approved for " & Cells(Target.Row, "A").Value & " on " & Cells(Target.Row, "I").Value & vbCrLf & "" & _
"Please prepare Budget Description and train broker for proper reimbursement billing" ' Email Body
newmsg.Display 'Display Email
newmsg.Send 'Send Email
MsgBox "Outlook message sent", , "Outlook message sent" ' Confirm Sent Email
End If
End If
End If
End If
End Sub
this is my message
it works great
i want to add with the same action 2 different emails to 2 different recipients meaning the same ok will send 2 different messages
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count = 1 Then
If Target.Column = 9 Then
If Cells(Target.Row, "I").Value <> "" Then
result = MsgBox("pressing OK will send email to notify", vbOKCancel + vbInformation, "Budget Approved")
If result = vbCancel Then SaveUI = True
If result = vbOK Then
Set OutlookApp = CreateObject("Outlook.Application")
Set OlObjects = OutlookApp.GetNamespace("MAPI")
Set newmsg = OutlookApp.CreateItem(olMailItem)
newmsg.Recipients.Add ("mail@mail.org")
newmsg.Subject = Cells(Target.Row, "A").Value & " budget was approved" ' Add Subject
newmsg.Body = "Now that budget was approved for " & Cells(Target.Row, "A").Value & " on " & Cells(Target.Row, "I").Value & vbCrLf & "" & _
"Please prepare Budget Description and train broker for proper reimbursement billing" ' Email Body
newmsg.Display 'Display Email
newmsg.Send 'Send Email
MsgBox "Outlook message sent", , "Outlook message sent" ' Confirm Sent Email
End If
End If
End If
End If
End Sub