ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   ?Module code copy (https://www.excelbanter.com/excel-programming/359564-module-code-copy.html)

gabch[_15_]

?Module code copy
 

Dear all,

If I write VBA codes and store in Module.
How can I copy the whole Module to new workbook through VBA?

Best regards


--
gabch
------------------------------------------------------------------------
gabch's Profile: http://www.excelforum.com/member.php...o&userid=30662
View this thread: http://www.excelforum.com/showthread...hreadid=535389


Paul B

?Module code copy
 
gabch, see if this will help,

http://www.cpearson.com/excel/vbe.htm

--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003

"gabch" wrote in
message ...

Dear all,

If I write VBA codes and store in Module.
How can I copy the whole Module to new workbook through VBA?

Best regards


--
gabch
------------------------------------------------------------------------
gabch's Profile:

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




Nigel

?Module code copy
 
Manually in the VBE - right click the module and choose Export. Save in the
desired location. In the target workbook, within the VBE right click the
VBAProject and choose import file.

--
Cheers
Nigel



"gabch" wrote in
message ...

Dear all,

If I write VBA codes and store in Module.
How can I copy the whole Module to new workbook through VBA?

Best regards


--
gabch
------------------------------------------------------------------------
gabch's Profile:
http://www.excelforum.com/member.php...o&userid=30662
View this thread: http://www.excelforum.com/showthread...hreadid=535389





All times are GMT +1. The time now is 05:36 PM.

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