+ Reply to Thread
Results 1 to 4 of 4

VBA: Send an email to a group of recipients based on a variable

  1. #1
    Registered User
    Join Date
    10-04-2022
    Location
    FRANCE
    MS-Off Ver
    O365
    Posts
    2

    VBA: Send an email to a group of recipients based on a variable

    Hi all,

    I tried to create a VBA button that allows you to automatically send an email to a group of recipients based on a variable (cell B7).
    If C7 = "A" then send to all recipients with an "A" (table on the right in my example attached), if C7="B" then send to all recipients with a "B".

    I managed to create a button that sends to a predefined email address but I can't include this type of variable. I don't even know if it's possible....

    If someone could help me it would be great.

    Sincerely,

    PS: Here is the "code" I tried to dovba mail.xlsx

    Please Login or Register  to view this content.

  2. #2
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    2,182

    Re: VBA: Send an email to a group of recipients based on a variable

    Try this adjusted macro to get you started:

    Please Login or Register  to view this content.
    WBD
    Office 365 on Windows 11, looking for rep!

  3. #3
    Registered User
    Join Date
    10-04-2022
    Location
    FRANCE
    MS-Off Ver
    O365
    Posts
    2

    Re: VBA: Send an email to a group of recipients based on a variable

    Thank you very much for your assistance. it's very helpful.

    Do you have any idea how to keep track of the information I have entered ?
    I would like to keep track of the information on line 7.
    Ideally, each line should be recorded one after the other in sheet2.

    In any case thank you again for your help.
    Regards

  4. #4
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    2,182

    Re: VBA: Send an email to a group of recipients based on a variable

    That sounds like a new question

    WBD

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Send Email with Recipients in Range
    By Wheelie686 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-04-2019, 02:38 PM
  2. send Email to all recipients where "Yes'' is in Col G
    By Howardc1001 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 07-03-2019, 12:47 PM
  3. send email to multiple recipients
    By plans in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 03-18-2014, 09:26 AM
  4. [SOLVED] How to send Lotus email with VBA to more recipients and also to more copy recipients
    By Sachy in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 03-20-2013, 03:23 PM
  5. send email, choose the recipients from UF
    By john55 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-20-2011, 03:28 PM
  6. Send email to many recipients using Excel...almost
    By Jimmy0306 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-04-2009, 07:36 PM
  7. Send email to multiple recipients
    By Court16 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-24-2009, 05:20 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1