Email Array
I currently use an email array in which the email
addresses are hard coded into the script. ActiveWorkbook.SendMail Recipients:=Array ", ", " ), Subject:="my customers Supplier Status Report " & Date, ReturnReceipt:="False" Is there a way to tablize the array so that i can edit it as needed without going into the code every time a change comes up? Thanks! |
Email Array
Patrick,
Put the email addresses in a worksheet range, and then assign that range to an array Dim aEmail aEmail = Worksheets("email").Range("A1:A10") -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Patrick" wrote in message ... I currently use an email array in which the email addresses are hard coded into the script. ActiveWorkbook.SendMail Recipients:=Array ", ", " ), Subject:="my customers Supplier Status Report " & Date, ReturnReceipt:="False" Is there a way to tablize the array so that i can edit it as needed without going into the code every time a change comes up? Thanks! |
Email Array
Hi Patrick
You can use the addresses in a range like this Dim MyArr As Variant MyArr = ActiveWorkbook.Sheets("mysheet").Range("c1:c10") ActiveWorkbook.SendMail MyArr, "This is the Subject line" -- Regards Ron de Bruin (Win XP Pro SP-1 XL2002 SP-2) www.rondebruin.nl "Patrick" wrote in message ... I currently use an email array in which the email addresses are hard coded into the script. ActiveWorkbook.SendMail Recipients:=Array ", ", " ), Subject:="my customers Supplier Status Report " & Date, ReturnReceipt:="False" Is there a way to tablize the array so that i can edit it as needed without going into the code every time a change comes up? Thanks! |
All times are GMT +1. The time now is 03:39 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com