Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro Copying To Another Workbook??


Friends, Please help me!

I have a workbook with macros in its sheets. When I takeout sheets into
a new workbook and close the orginal workbook. The New workbook does not
have the macros?
Why? And how can I have the macros travel with whatever sheet I create
away from its parent Workbook.

Please help, Thank you very much for your time.


--
countryfan_nt
------------------------------------------------------------------------
countryfan_nt's Profile: http://www.excelforum.com/member.php...o&userid=11051
View this thread: http://www.excelforum.com/showthread...hreadid=355861

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro Copying To Another Workbook??

A macro is written in a "module" of the active workbook.
So, if you close this workbook, you indeed have no longer access to that
macro.

I see 2 solutions (for the moment), even if none of them is quite
users-friendly :
1) you can open the Microsoft Visual Basic, insert a new module in your new
workbook and copy the text of your macro to paste in the new module
2) you can export your module from the original workbook and import it in
your new workbook

As I said, none of them is user-frindly, but at least, you get your macros
copied.

Hope this helps a bit,
Bruno



"countryfan_nt" wrote in
message ...

Friends, Please help me!

I have a workbook with macros in its sheets. When I takeout sheets into
a new workbook and close the orginal workbook. The New workbook does not
have the macros?
Why? And how can I have the macros travel with whatever sheet I create
away from its parent Workbook.

Please help, Thank you very much for your time.


--
countryfan_nt
------------------------------------------------------------------------
countryfan_nt's Profile:

http://www.excelforum.com/member.php...o&userid=11051
View this thread: http://www.excelforum.com/showthread...hreadid=355861



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,337
Default Macro Copying To Another Workbook??

Pls stay in the ORIGINAL thread
Many macros can be in the sheet module so try putting there. Some CANT.

--
Don Guillett
SalesAid Software

"Bruno Vermeersch" wrote in message
...
A macro is written in a "module" of the active workbook.
So, if you close this workbook, you indeed have no longer access to that
macro.

I see 2 solutions (for the moment), even if none of them is quite
users-friendly :
1) you can open the Microsoft Visual Basic, insert a new module in your

new
workbook and copy the text of your macro to paste in the new module
2) you can export your module from the original workbook and import it in
your new workbook

As I said, none of them is user-frindly, but at least, you get your macros
copied.

Hope this helps a bit,
Bruno



"countryfan_nt" wrote in
message ...

Friends, Please help me!

I have a workbook with macros in its sheets. When I takeout sheets into
a new workbook and close the orginal workbook. The New workbook does not
have the macros?
Why? And how can I have the macros travel with whatever sheet I create
away from its parent Workbook.

Please help, Thank you very much for your time.


--
countryfan_nt
------------------------------------------------------------------------
countryfan_nt's Profile:

http://www.excelforum.com/member.php...o&userid=11051
View this thread:

http://www.excelforum.com/showthread...hreadid=355861





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
copying workbook formating to a differnent workbook Roger Excel Worksheet Functions 0 October 30th 09 05:27 PM
Macro for Copying Worksheet to New Workbook MGC Excel Discussion (Misc queries) 10 August 17th 07 01:57 AM
Copying a workbook with custom toolbar assigned to a macro Matt W Excel Discussion (Misc queries) 1 February 4th 05 10:46 PM
copying macro to a new workbook JT[_2_] Excel Programming 3 December 15th 04 06:16 PM
Copying VBA modules from one workbook to another with a macro? Revolvr[_2_] Excel Programming 2 May 6th 04 11:04 AM


All times are GMT +1. The time now is 09:46 AM.

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"