Is it possible to copy a code module using VBA?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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

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

Back
Top