Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Creating new VBA code on the fly
I am writing an Excel/VBA application in which it would be helpful
to construct a new VBA module 'on the fly," i.e, so it could be used in the same application later. I've previously used InsertLines to create an event procedure for a control button click on a worksheet, so that is one possibility if I can figure out the details. How would I indicate Which module to put it in? Another possibility is to write the code to a file, then import the file as a module. Is importing possible programmatically, or only from the File menu in the VBA IDE? TIA |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Creating new VBA code on the fly
Jag
Check out Chip Pearson's site for this. http://www.cpearson.com/excel/vbe.htm Gord Dibben Excel MVP On Thu, 12 Feb 2004 15:02:03 -0800, "Jag Man" wrote: I am writing an Excel/VBA application in which it would be helpful to construct a new VBA module 'on the fly," i.e, so it could be used in the same application later. I've previously used InsertLines to create an event procedure for a control button click on a worksheet, so that is one possibility if I can figure out the details. How would I indicate Which module to put it in? Another possibility is to write the code to a file, then import the file as a module. Is importing possible programmatically, or only from the File menu in the VBA IDE? TIA |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Creating charts with VBA code | Charts and Charting in Excel | |||
Creating a code for a macro | Excel Discussion (Misc queries) | |||
Creating new VBA code on the fly | Excel Programming | |||
Creating a loop from my code | Excel Programming |