+ Reply to Thread
Results 1 to 2 of 2

inserting a macro into a Tempfile

  1. #1
    Registered User
    Join Date
    08-10-2010
    Location
    OOOOklahoma
    MS-Off Ver
    Excel 2007
    Posts
    19

    inserting a macro into a Tempfile

    I have a macro that extracts a worksheet then inserts it into a tempfile then uses outlook to send the worksheet.

    What I am having problems with is inserting a macro in the Tempfile that the person who is recieving the file can use to protect the worksheet after they have made their adjustments and then email the file.

    basically this would amount too inserting a macro into a macro
    Last edited by mcantrell; 08-26-2010 at 02:00 PM.

  2. #2
    Forum Contributor
    Join Date
    05-09-2009
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    315

    Re: inserting a macro into a Tempfile

    Hi

    I use the following code to export a sheet ("EmailFile") to a new workbook, then export Module1 (which contains the code that I want to copy over) from ThisWorkbook into the newly created workbook.

    Obviously you'll need to customise it to your needs. Hopefully the comments help explain what each section does.

    Dion


    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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