ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   MacroCopy (https://www.excelbanter.com/excel-discussion-misc-queries/147345-macrocopy.html)

kyoshirou

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

Dave Peterson

MacroCopy
 
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

kyoshirou wrote:

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


--

Dave Peterson


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com