+ Reply to Thread
Results 1 to 4 of 4

Create Macro to copy worksheet into new workbook, change things& drop into Outlook

  1. #1
    Registered User
    Join Date
    10-27-2010
    Location
    Salisbury, Maryland
    MS-Off Ver
    Excel 2010
    Posts
    41

    Create Macro to copy worksheet into new workbook, change things& drop into Outlook

    Good morning,

    I've been scouring the web the last several days to find code that will allow me to copy and existing worksheet into its own workbook, change a few things and then drop it into a pre-addressed e-mail in Outlook. The closest I have found is one that won't allow me to make changes to the worksheet once it is copied to its own workbook.


    Sub CopyWorksheettoEmail()

    Dim wb As Workbook
    Set wb = Workbooks.Add
    ThisWorkbook.Sheets("PRM Data").Copy After:=wb.Sheets(1)
    'ThisWorkbook.Sheets("config").Copy After:=wb.Sheets(1)

    wb.Application.Dialogs(xlDialogSendMail).Show "" & y & "[email protected]"

    Set wb = Nothing

    End Sub




    Thanks,

    Steve

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Create Macro to copy worksheet into new workbook, change things& drop into Outlook

    Perhaps this link will help.

    Mail from Excel with Outlook (Windows)
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,015

    Re: Create Macro to copy worksheet into new workbook, change things& drop into Outlook

    .
    Actually, you have an excellent view of what needs to be accomplished. Now to locate examples, once pieced together, will accomplish your overall goal.

    #1: Copy a sheet from one workbook to a newly created workbook.

    Please Login or Register  to view this content.
    #2: Edit the newly created sheet.

    Please Login or Register  to view this content.
    #3: Attach worksheet to email.

    Please Login or Register  to view this content.
    Mind you, the above is not all inclusive. You will need to modify the code in several respects to accomplish exactly what you need.

  4. #4
    Registered User
    Join Date
    10-27-2010
    Location
    Salisbury, Maryland
    MS-Off Ver
    Excel 2010
    Posts
    41

    Re: Create Macro to copy worksheet into new workbook, change things& drop into Outlook

    Thanks for the constructive feedback. It might take me a bit to digest all of it.

+ 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. Use a macro to copy data from Outlook email to Excel workbook
    By Santhoshhrishi in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-10-2015, 12:36 AM
  2. [SOLVED] i have this code to create a new workbook but id like to change a couple things
    By Jenkins27 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-14-2015, 01:40 PM
  3. Replies: 3
    Last Post: 05-26-2014, 02:21 AM
  4. [SOLVED] Macro to Copy Master Worksheet create and paste in new auto named worksheet
    By TheRealLethality in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-15-2014, 12:46 AM
  5. VBA to create new Workbook and copy worksheet into it dynamically
    By rob read in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-21-2013, 11:55 AM
  6. Drop down selection that causes the macro to do different things
    By bwood7 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-28-2013, 12:40 PM
  7. Create copy of worksheet plus code in the same workbook
    By ahmed-k in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-05-2009, 07:13 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