MacroCopy

K

kyoshirou

How to copy macro from another file?
When i copy already, it seems that another file has to opened up.
 
D

Dave Peterson

To do it manually, you'll have to open both workbooks.

Then you can go to the VBE and select text in the procedure you want copied and
edit|copy.

Go to the other workbook's project and open a module and edit|paste. (or make a
new module and paste there.)

If you want to copy the entire module from one project to another project, you
can use

Ctrl-r (to see the project explorer)
select the module in the project that you want to copy
and drag it to the other workbook's project.

======
If you have the code in a text file (not within a workbook), you can use code to
import it into your project.

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