Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I combine Exel workbooks? Kman Excel Worksheet Functions 2 May 5th 08 09:26 PM
combine several workbooks without opening Trang Excel Discussion (Misc queries) 4 December 3rd 07 09:55 PM
how to combine workbooks or spreadsheets in to one???? musiclover Excel Worksheet Functions 1 April 3rd 07 07:56 PM
VBA - Combine Workbooks jordanctc[_25_] Excel Programming 2 October 15th 04 12:35 AM
Combine Sheets From Different Workbooks Tim Fortune Excel Programming 4 January 17th 04 11:31 PM


All times are GMT +1. The time now is 03:51 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"