ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Use of a range as an email address in a .SendMail array (https://www.excelbanter.com/excel-programming/414464-use-range-email-address-sendmail-array.html)

Simon[_2_]

Use of a range as an email address in a .SendMail array
 
Rather then hard wiring the email addresses into the code I wish to
place it in the worksheet then define it as a Range and input the
range in the array as shown below.



How can I get it to work, I think I need something other than .Value



Dim MyPath5 As String, MyRange5 As Range

Set MyRange5 = MyWBConvertor.ActiveSheet.Range("D1")

MyPath5 = MyWBConvertor.Path



''''''''''''''''''''''''''''''''''''''

MyWBLnkZn.SendMail Recipients:=Array("MyRange5")




Ron de Bruin

Use of a range as an email address in a .SendMail array
 
Hi Simon

See
http://www.rondebruin.nl/mail/tips1.htm

Dim MyArr As Variant
MyArr = ThisWorkbook.Sheets("Sheet1").Range("A1:A20")
.SendMail MyArr, "This is the Subject line"



--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Simon" wrote in message ...
Rather then hard wiring the email addresses into the code I wish to
place it in the worksheet then define it as a Range and input the
range in the array as shown below.



How can I get it to work, I think I need something other than .Value



Dim MyPath5 As String, MyRange5 As Range

Set MyRange5 = MyWBConvertor.ActiveSheet.Range("D1")

MyPath5 = MyWBConvertor.Path



''''''''''''''''''''''''''''''''''''''

MyWBLnkZn.SendMail Recipients:=Array("MyRange5")





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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com