whats wrong now?
this is my sheet i am working off:
lifeplan and sap are column 6 and 7 respectively, both need to checked (using a dropdown check or x in symbols) to generate the email
either column can be entered first or second however BOTH need a checkmark to generate the e-mail
Private Sub Worksheet_Change(ByVal ActiveCell)
If ActiveCell.Value = ("unicode (hex) 2714") And ActiveCell.Offset(0, 1) = ("unicode (hex) 2714") Then
result = MsgBox("pressing OK will send email to notify", vbOK + vbExclamation, "can launch")
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") ' Add Recipients
newmsg.Subject = "can launchl" ' Add Subject
newmsg.Body = "launch" & vbCrLf & "" & _
"Please schedule launch for " & _
Target.Cells.Offset(0, -6).Value ' 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 Sub
this is my sheet i am working off:
PARTICIPANT | DDRO | TABS | BRK | BUDGET EFFECTIVE DATE | Launch Date | Lifeplan | SAP |
Smith, John | QU | 11111 | JC | 10/1/2019 | 11/4/2019 | ✔ | ✔ |
either column can be entered first or second however BOTH need a checkmark to generate the e-mail
Private Sub Worksheet_Change(ByVal ActiveCell)
If ActiveCell.Value = ("unicode (hex) 2714") And ActiveCell.Offset(0, 1) = ("unicode (hex) 2714") Then
result = MsgBox("pressing OK will send email to notify", vbOK + vbExclamation, "can launch")
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") ' Add Recipients
newmsg.Subject = "can launchl" ' Add Subject
newmsg.Body = "launch" & vbCrLf & "" & _
"Please schedule launch for " & _
Target.Cells.Offset(0, -6).Value ' 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 Sub