I currently have code that will send an email automatically once a value is changed in a cert cell see below. I want to include the value from another cell in the body of the email how do I do this? example of what I need.
Headers = Date (A2) Run# (B2) Status (C3)
2/2/17 12 resolved
Currently when the email is sent the body says "Status has been updated"
I want the code to add the run # from the B2 column
so it looks like this "Status has been updated"
Run # 12
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect([c3:c5555], Target) Is Nothing Then
Set olApp = CreateObject("Outlook.application")
Set M = olApp.CreateItem(olMailItem)
With M
.Subject = "Billing QA"
.Body = "Status has been updated"
.Recipients.Add "cporter@medicambulance.net"
.Attachments.Add ActiveWorkbook.FullName
.send
End With
End If
End Sub
Headers = Date (A2) Run# (B2) Status (C3)
2/2/17 12 resolved
Currently when the email is sent the body says "Status has been updated"
I want the code to add the run # from the B2 column
so it looks like this "Status has been updated"
Run # 12
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect([c3:c5555], Target) Is Nothing Then
Set olApp = CreateObject("Outlook.application")
Set M = olApp.CreateItem(olMailItem)
With M
.Subject = "Billing QA"
.Body = "Status has been updated"
.Recipients.Add "cporter@medicambulance.net"
.Attachments.Add ActiveWorkbook.FullName
.send
End With
End If
End Sub