.To = emailTo
Open in new window
Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.
Private Sub Worksheet_Change(ByVal Target As Range)
Dim emailTo As String
If Target.Column = 11 Then
'Column K is 11th. A=1, J=10 etc
If UCase(Target.Value) = "0" Then
emailTo = Target.Offset(0, -3).Value 'address is 3 columns to left
Dim OutApp As Outlook.Application
Dim OutMail As Outlook.MailItem
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(olMailItem)
.To = "email@example.com"
.CC = ""
.Subject = "Notification"
.Body = "Cell A1 Changed."
Set OutMail = Nothing
Set OutApp = Nothing
On Error GoTo 0
.To = emailTo '/// not "firstname.lastname@example.org"
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment
From novice to tech pro — start learning today.
Premium members can enroll in this course at no extra cost.