Move/Copy Worksheet with Macros

H

Hansplay

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
 
G

Gary''s Student

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.
 
H

Hansplay

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top