Automized Code-Creation

P

Peter Plumber

Hi,

is there a way to add Modules, Class-Modules or User-Forms
to Excel-Workbooks or Word-Documents from "outside"?
How shoud this to be done?

thx

Peter
 
J

Jonathan West

Hi Peter,

If the code is already in a complete module, then in the VBA editor you can
go FileImport to import an external module to your project. Also you can
drag a frm, cls or bas file from Windows Explorer and drop it into the
project in the procect window in the VBA editor. You can also drag and drop
modules between projects in the VBA editor if you have multiple files open.

If you want to import a single routine or a code fragment, then you can copy
& paste from the outside.
 
S

Stephen Bullen

Hi Peter,
is there a way to add Modules, Class-Modules or User-Forms
to Excel-Workbooks or Word-Documents from "outside"?
How shoud this to be done?

Yes, using the VBA Extensibility library. Chip Pearson has some
information on his web site at www.cpearson.com, and I wrote a chapter
about it in the "Excel 2002 VBA Programmer's reference".

Regards

Stephen Bullen
Microsoft MVP - Excel
www.oaltd.co.uk
 

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

Top