I am not quite clear exactly when you would like an email to be sent.
Is it when you change a cell in column A ('Subject Line') or when you
update an email address in column D. Anyhow here is code that you
could place in the VBA module associated with the worksheet you would
like to respond to changes by sending email. This code assumes that
you want email to be sent when you change the subject line, but it
would be straightforward to change that by modifying the event
handler. I hope the rest is sufficiently clear.

Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Row = 1 Then Exit Sub
    If Target.Column > 1 Then Exit Sub
    If Target.Offset(, 3).Value <> "" Then
        Call SendMail(Target.Offset(, 3).Value, Target.Value)
    End If
End Sub

Sub SendMail(strTo As String, strSubject As String)

    Dim objOut As Outlook.Application
    Dim objMail As Outlook.MailItem
    Dim strBody As String

    On Error Resume Next

    Application.DisplayAlerts = False

    Set objOut = New Outlook.Application
    Set objMail = objOut.CreateItem(olMailItem)

    strBody = "Hi Team:"
    strBody = strBody & vbCrLf & vbCrLf & "Pls provide the email id
for the email with above subject line."
    strBody = strBody & vbCrLf & vbCrLf & "Thanks."

    With objMail
        .To = strTo
        .Body = strBody
        .Subject = strSubject
        .Send
    End With

    Set objOut = Nothing
    Application.DisplayAlerts = True

End Sub

Rolf Jaeger
SoarentComputing
http://soarentcomputing.com/SoarentComputing/ExcelSolutions.htm


On Nov 18, 8:52 am, hemant shah <hemanthin...@gmail.com> wrote:
> Hello Everyone,
>
> Can you help me with my query. I have updated everything i require in
> the attached excel.
>
> Regards,
>
> Hemant Shah
>
> Please do not print this email unless it is absolutely necessary.
>
> The information contained in this electronic message and any
> attachments to this message are intended for the exclusive use of the
> addressee(s) and may contain proprietary, confidential or privileged
> information. If you are not the intended recipient, you should not
> disseminate, distribute or copy this e-mail. Please notify the sender
> immediately and destroy all copies of this message and any
> attachments.
>
> WARNING: Computer viruses can be transmitted via email. The recipient
> should check this email and any attachments for the presence of
> viruses. The company accepts no liability for any damage caused by any
> virus transmitted by this email.
>
> www.wipro.com
>
>  Book1.xls
> 29KViewDownload

-- 
----------------------------------------------------------------------------------
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com
<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!

We reach over 6,500 subscribers worldwide and receive many nice notes about the 
learning and support from the group. Our goal is to have 10,000 subscribers by 
the end of 2009. Let friends and co-workers know they can subscribe to group at 
http://groups.google.com/group/excel-macros/subscribe

Reply via email to