VBA Multiple E-Mail help. Using "SendMail"

CompQueen

New Member
Joined
Aug 2, 2006
Messages
13
Please read this entire question and plese do not redirect me to a different post or a webpage. All I need is the answer and people who do not know the answer have sent me on wild chases.

=====

I have built a VBA that sends reports to a bunch of people. Each report is unique and goes to four people. I have figured out how to do everything but get the VBA to allow multiple e-mails. Below are some codes that I have used for this project:

(The special e-mails are pulled using a VLookup and placed in cells F1, F2, F3, F4)

--VBA --
MANAGER1 = Worksheets("MASTER_SHEET").Range("F1").Value
MANAGER2 = Worksheets("MASTER_SHEET").Range("F2").Value
MANAGER3 = Worksheets("MASTER_SHEET").Range("F3").Value
TOP_MANAGER = Worksheets("MASTER_SHEET").Range("F4").Value

....

(This part keeps erroring out)


With wb2
.SendMail MANAGER1; MANAGER2; MANAGER3; TOP_MANAGER, _
"Performance Management"

Please help me rewrite the ".SendMail" line - I think this is the problem.

It works if I put .SendMail MANAGER1, _

I will be forever greatful if you can give me the correct code.

Thank you,

Bonnie
 

Some videos you may like

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.

mbb4331

Board Regular
Joined
Dec 22, 2005
Messages
152
Have you tried:

With wb
.sendmail recipients:=MANAGER1 & ";" & MANAGER2 & ";" & MANAGER3 & ";" & TOP_MANAGER
end with
 

mbb4331

Board Regular
Joined
Dec 22, 2005
Messages
152
Sorry.

Here it is, tested and confirmed.


strRecipients = Array("Name1", "Name2")

ThisWorkbook.SendMail Recipients:=Array(strRecipients)
 

Watch MrExcel Video

Forum statistics

Threads
1,111,910
Messages
5,541,538
Members
410,547
Latest member
htran4
Top