+ Reply to Thread
Results 1 to 8 of 8

Vba to copy a worksheet based on a cell, save the worksheet based on a cell then mail it b

  1. #1
    Registered User
    Join Date
    09-28-2012
    Location
    South Africa
    MS-Off Ver
    Excel 2010
    Posts
    57

    Vba to copy a worksheet based on a cell, save the worksheet based on a cell then mail it b

    Hi

    I am new at this level of VBA can anyone help me

    I have a wokbook with a sheet called Email, I need to match cell A3 with the correct worksheet , copy it to a new workbook, save it to the path that matches F3 with the file name in E3.

    This needs to work down the list and complete all the sheets. I then need to email those new workbooks to the email addresses in the same row eg G3 -O3 the the subject and body in D3 & E3

    This needs to do all the sheets matching the relevant data I have attched a sample

    Thank you in advance
    Penny
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    04-01-2015
    Location
    The Netherlands
    MS-Off Ver
    2003/2007/2010/2016/office 365
    Posts
    880

    Re: Vba to copy a worksheet based on a cell, save the worksheet based on a cell then mail

    Maybe with something like this?

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    09-28-2012
    Location
    South Africa
    MS-Off Ver
    Excel 2010
    Posts
    57

    Re: Vba to copy a worksheet based on a cell, save the worksheet based on a cell then mail

    Thank you so much

    It worked .

  4. #4
    Registered User
    Join Date
    09-28-2012
    Location
    South Africa
    MS-Off Ver
    Excel 2010
    Posts
    57

    Re: Vba to copy a worksheet based on a cell, save the worksheet based on a cell then mail

    Hi There
    Again thank you .Just realized that all the saved spreadsheets are attached to all the email addresses in one email. Is it possible to have separate emails for example the first saved file goes to 2 separate emails, the next file goes to 4 different emails so each file reads the different email addresses .

    Many thanks
    Penny

  5. #5
    Valued Forum Contributor
    Join Date
    04-01-2015
    Location
    The Netherlands
    MS-Off Ver
    2003/2007/2010/2016/office 365
    Posts
    880

    Re: Vba to copy a worksheet based on a cell, save the worksheet based on a cell then mail

    Clear c01
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    09-28-2012
    Location
    South Africa
    MS-Off Ver
    Excel 2010
    Posts
    57

    Re: Vba to copy a worksheet based on a cell, save the worksheet based on a cell then mail

    Hi

    Thank you. If you can please help with the email side

    the first saved file Stanlib Management Fees September 2019 should be emailed separatley to the the email addresses in G3 & H3
    Then the next file Alexander Forbes Management Fees September 2019 should be emailed separately to the address in G4, H4.I4 J4
    then the file Acsis Management Fees September 2019 needs to be emailed seperately to G5.H5.I5.J5 k5.l5
    then the next file NFMW Management Fees September 2019 needs to be emailed seperatley to G6,H6.I6.J6,K6,l6.M6.n6
    So inn total there will be 20 emails for this run. can this be done.

    The saving is working beautifully
    Many thanks for you help so far

  7. #7
    Valued Forum Contributor
    Join Date
    04-01-2015
    Location
    The Netherlands
    MS-Off Ver
    2003/2007/2010/2016/office 365
    Posts
    880

    Re: Vba to copy a worksheet based on a cell, save the worksheet based on a cell then mail

    Trying something yourself won't hurt either.

    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    09-28-2012
    Location
    South Africa
    MS-Off Ver
    Excel 2010
    Posts
    57

    Re: Vba to copy a worksheet based on a cell, save the worksheet based on a cell then mail

    Thank you very much

    I have learnt so much

    Many thanks
    Penny

+ 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] Save As worksheet based on cell value on another sheet
    By biznez in forum Excel Programming / VBA / Macros
    Replies: 23
    Last Post: 05-06-2015, 01:41 PM
  2. [SOLVED] Copy row from one worksheet to another worksheet based on cell value
    By jprlimey in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-27-2014, 06:49 PM
  3. Copy data from a copied worksheet to another worksheet based on cell reference
    By tantcu in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-08-2013, 02:18 PM
  4. [SOLVED] Copy rows from one worksheet to another worksheet based on a cell criteria.
    By keneco in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-07-2013, 10:28 AM
  5. [SOLVED] Copy rows from my main worksheet to another worksheet based on data in one cell
    By gcol in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 08-08-2012, 05:12 AM
  6. HELP - Code to Copy/Format/Save/Print Worksheet Based on Cell Values
    By larzep in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 03-06-2012, 09:08 PM
  7. Save Worksheet Based on Cell Value
    By Mooseman60 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-20-2011, 05:22 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