Is it possible to copy a code module using VBA?

Q

quartz

Hello, I hope someone can help me. I am using VBA in Excel XP with Win 2000

I know that you can reference "extensibility" to write lines to, and edit, a code module

BUT, can you simply copy an entire module from one file to another using VBA? (as though you did a drag and drop in the VBE itself

If so, please respond with your example code, I can't figure it out...thanks much in advance.
 
C

Chip Pearson

You can export the module to a file, and then import that file in
to another project. See www.cpearson.com/excel/vbe.htm for more
details.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


quartz said:
Hello, I hope someone can help me. I am using VBA in Excel XP with Win 2000.

I know that you can reference "extensibility" to write lines to, and edit, a code module.

BUT, can you simply copy an entire module from one file to
another using VBA? (as though you did a drag and drop in the VBE
itself)
If so, please respond with your example code, I can't figure it
out...thanks much in advance.
 
Top