Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Move/Copy Worksheet with Macros

When I copy a set of worksheets from one workbook to another the macros don't
follow.

Let me Explain:

I copy worksheets from workbook A into workbook B and close workbook A.
Then from workbook B I select the command button to run a macro. What
happens is workbook A opens again and runs the macro. If I break the link
with workbook A in workbook B using Edit/Links the command button doesn't do
anything.

How can I move the worksheets into the new workbook and have them behave as
they did originally?

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Move/Copy Worksheet with Macros

A tiny trick:

Rather than copy sheets from Book A to Book B, make a "Book B" by making a
copy of Book A, removing material you don't want in B, adding material you do
want in B and then calling the modifed copy Book B.

The point is that by copying Book A, you will also copy all the included
macros.
--
Gary''s Student - gsnu200907


"Hansplay" wrote:

When I copy a set of worksheets from one workbook to another the macros don't
follow.

Let me Explain:

I copy worksheets from workbook A into workbook B and close workbook A.
Then from workbook B I select the command button to run a macro. What
happens is workbook A opens again and runs the macro. If I break the link
with workbook A in workbook B using Edit/Links the command button doesn't do
anything.

How can I move the worksheets into the new workbook and have them behave as
they did originally?

Thanks

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Move/Copy Worksheet with Macros

Thanks for the quick response. The only problem with that is "Book B" also
contains macros that I need to keep. I am combining two workbooks, each
containing several macros.

Thanks.

"Gary''s Student" wrote:

A tiny trick:

Rather than copy sheets from Book A to Book B, make a "Book B" by making a
copy of Book A, removing material you don't want in B, adding material you do
want in B and then calling the modifed copy Book B.

The point is that by copying Book A, you will also copy all the included
macros.
--
Gary''s Student - gsnu200907


"Hansplay" wrote:

When I copy a set of worksheets from one workbook to another the macros don't
follow.

Let me Explain:

I copy worksheets from workbook A into workbook B and close workbook A.
Then from workbook B I select the command button to run a macro. What
happens is workbook A opens again and runs the macro. If I break the link
with workbook A in workbook B using Edit/Links the command button doesn't do
anything.

How can I move the worksheets into the new workbook and have them behave as
they did originally?

Thanks

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
cannot Move or Copy a worksheet Bern Excel Worksheet Functions 3 September 11th 08 09:31 PM
Can not copy or move some worksheet NTNH Excel Worksheet Functions 1 May 28th 07 12:14 PM
Move or Copy Worksheet Andi Excel Worksheet Functions 6 May 15th 07 09:51 PM
Move/Copy or Copy/Insert worksheet? kjk Excel Discussion (Misc queries) 0 December 15th 06 02:40 PM
Unable to Insert Worksheet/Move and copy worksheet Excel 2003 lukerush Excel Worksheet Functions 2 September 7th 06 05:05 PM


All times are GMT +1. The time now is 10:26 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"