Inserting VBA Code Programmatically
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
|