+ Reply to Thread
Results 1 to 4 of 4

Mailing Multiple Sheets as attachements... with a twist

  1. #1
    Registered User
    Join Date
    06-19-2012
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    3

    Mailing Multiple Sheets as attachements... with a twist

    Hey guys,

    Been at this for a while trying to use bits and pieces of code from other templates. No luck so far.

    http://www.rondebruin.nl/win/s1/outlook/amail3.htm

    In the link above is a particular function that I need to use. Everything works fine, but I'd like an additional function to be added.

    If you could take a look at the .Sheets(Array("Sheet1", "Sheet3")).Copy line... You'll notice that I can choose which sheets to be mailed as an attachment. What I'd like to be able to do is select the worksheets by name based on a value in a cell.

    For instance, if I have the word "Budgets" typed in A1. I'd like to be able to send the worksheet titled "Budgets" as an attachment in the email. If I happen to change that value in A1, I'd like for the attachment to change when I run the Macros. I hope this makes sense.

    Would anyone be so kind as to help me out?

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Mailing Multiple Sheets as attachements... with a twist

    Maybe:

    .Sheets(Array(CStr(Range("A1")),"Sheet1", "Sheet3")).Copy
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Registered User
    Join Date
    06-19-2012
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Mailing Multiple Sheets as attachements... with a twist

    Annnnd that's the one! Thank you very much for your fast reply. This worked perfectly. Consider this solved.

  4. #4
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Mailing Multiple Sheets as attachements... with a twist

    You're welcome!

+ 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] How to 'mailto' 2 specific sheets as 2 separate attachements, in .PDF fileformat?
    By tnuis in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-15-2013, 03:41 AM
  2. Replies: 20
    Last Post: 03-13-2013, 04:15 PM
  3. Add multiple attachements
    By john55 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-01-2012, 01:31 AM
  4. Summarize sheets with a twist
    By consultantguy in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-06-2007, 06:34 PM
  5. Summing across multiple sheets with a twist
    By hillmic in forum Excel Formulas & Functions
    Replies: 49
    Last Post: 09-06-2005, 12:05 PM

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