View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
roadkill roadkill is offline
external usenet poster
 
Posts: 173
Default Inserting VBA Code Programmatically

This looks like it should take care of my my problem.
Thank you

"Jim Thomlinson" wrote:

Check out this link...

http://www.cpearson.com/excel/vbe.htm

--
HTH...

Jim Thomlinson


"roadkill" wrote:

Is there a way to insert VBA code programmatically? I have a template
containing a macro that, among other things, creates a sheet with a pivot
table. There is also a macro in a module in this file that I want to run
whenever this pivot table is updated. Since the sheet with the pivot table
doesn't exist until created by the macro, I don't know of a way (other than
manually after the macro runs) to drop in the event macro to trigger the
desired module code. Is there a programmatic way to do this?
Will