Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sending an email
Hi
Sub Mail_workbook_1() ActiveWorkbook.SendMail activesheet.range("Q4").value, _ "EIS - Feeback Form" ActiveWorkbook.Close False End Sub -- Regards Frank Kabel Frankfurt, Germany Jamie wrote: 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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sending an email
hi,
see this site http://www.rondebruin.nl/sendmail.htm reguards Frank -----Original Message----- 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 ") 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 . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
sending email to several contacts? | Excel Discussion (Misc queries) | |||
Sending a Spreadsheet as an Email Attachment vs. Imbedded in Email | Excel Discussion (Misc queries) | |||
Email sending | Excel Discussion (Misc queries) | |||
Sending an email to more than one person. | Excel Programming | |||
sending email in Excel | Excel Programming |