Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 38
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating charts with VBA code Ayo Charts and Charting in Excel 2 April 8th 09 12:08 PM
Creating a code for a macro engbe Excel Discussion (Misc queries) 1 May 10th 08 02:28 PM
Creating new VBA code on the fly Jag Man Excel Programming 2 February 12th 04 05:06 AM
Creating a loop from my code Todd Huttenstine\(Remote\) Excel Programming 3 November 28th 03 04:05 PM


All times are GMT +1. The time now is 09:20 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"