LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 191
Default Sending an email

Hi There

I have the following code to send an email when a button is clicked:

Sub Mail_workbook_1()
ActiveWorkbook.SendMail ", _
"EIS - Feeback Form"
ActiveWorkbook.Close False

End Sub

I would like to be able to change the address that the email is sent to
based on a cell value.

At the moment I have an if statement in Q4 that says
",if(a1="MrB","MrB@C ompanyB.com")

so basically if Mr A is selected in A1 when the macro runs it will send th
eemail to Mr A's address and if Mr B is in A1 then it will send to Mr B's
address.

Any help on this would be greatly appreciated.

Thanks in advance

Jamie



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
sending email to several contacts? L.S. Excel Discussion (Misc queries) 2 November 24th 09 03:18 PM
Sending a Spreadsheet as an Email Attachment vs. Imbedded in Email billbrandi Excel Discussion (Misc queries) 1 April 3rd 08 03:44 AM
Email sending colourp Excel Discussion (Misc queries) 1 January 13th 06 01:13 AM
Sending an email to more than one person. sungen99[_6_] Excel Programming 7 May 7th 04 03:15 PM
sending email in Excel Peter W[_2_] Excel Programming 1 September 15th 03 04:13 PM


All times are GMT +1. The time now is 08:08 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"