vba with 2 lines checked message box to send email

Status
Not open for further replies.

rjmdc

Well-known Member
Joined
Apr 29, 2020
Messages
676
Office Version
  1. 365
Platform
  1. Windows
whats wrong now?
this is my sheet i am working off:
PARTICIPANTDDRO TABSBRKBUDGET EFFECTIVE DATELaunch DateLifeplanSAP
Smith, JohnQU
11111​
JC
10/1/2019​
11/4/2019​
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
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Duplicate more message box to email help

Please do not post the same question multiple times. All clarifications, follow-ups, and bumps should be posted back to the original thread.
Per forum rules, posts of a duplicate nature will be locked or deleted (rule 12 here: Forum Rules).
 
Upvote 0
Status
Not open for further replies.

Forum statistics

Threads
1,215,762
Messages
6,126,736
Members
449,334
Latest member
moses007

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top