+ Reply to Thread
Results 1 to 2 of 2

Combine Workbooks

  1. #1
    LRL
    Guest

    Combine Workbooks

    My workflow is as follows:

    1) The user creates a workbook from a template (file.xlt) which has a
    number of macros and userforms in various modules including the
    workbook and the worksheet. He makes various changs to the new
    workbook.

    2) The user has his own workbook which may or may not have his own
    macros.

    3) The user wants to insert the worksheet created from the template
    into his own workbook. If he uses move/copy sheet, the sheet gets
    moved, but only the macros associated with the worksheet are moved. Any
    attempt to run them fails since they refer to routines in the modules.

    How can I combine the two workbooks together so that all the code
    modules move from my workbook into his workbook?

    Thanks
    LRL


  2. #2
    Dave Peterson
    Guest

    Re: Combine Workbooks

    You could give the user the ability to copy over the macros.

    See Chip Pearson's site:
    http://www.cpearson.com/excel/vbe.htm

    But you may want to reconsider your approach. Maybe you could give the users a
    separate addin that contains all the macros that they need. Then get as much
    code out of the workbook as you can.

    This'll save you when you find that error that needs to be corrected--you'll
    just have to fix the addin, not each workbook that may have copied that code.



    LRL wrote:
    >
    > My workflow is as follows:
    >
    > 1) The user creates a workbook from a template (file.xlt) which has a
    > number of macros and userforms in various modules including the
    > workbook and the worksheet. He makes various changs to the new
    > workbook.
    >
    > 2) The user has his own workbook which may or may not have his own
    > macros.
    >
    > 3) The user wants to insert the worksheet created from the template
    > into his own workbook. If he uses move/copy sheet, the sheet gets
    > moved, but only the macros associated with the worksheet are moved. Any
    > attempt to run them fails since they refer to routines in the modules.
    >
    > How can I combine the two workbooks together so that all the code
    > modules move from my workbook into his workbook?
    >
    > Thanks
    > LRL


    --

    Dave Peterson

+ 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