Template Macro Execution

  • Thread starter Thread starter Nigel
  • Start date Start date
N

Nigel

Hi All
I have an Excel application that calls a procedure to load a template file,
populate this new file with copies of the data from the application and then
save the new file as an Excel workbook. All OK so far.

The reason I use a template is that embedded within it is a VBA module that
acts on the data loaded into its sheets that creates some charts and emails
various people. This works OK as well. Except I run this manually after
the first process has run.

I do not want the first process to initiate the template VBA module but
would like it to run after the file has been created. There is a good
reason for this. What methods are open to me?

Can I get a VBA module to be initiated by a before close event, that is
embedded in the template and copied into the output sheet?

I could experiment but I am hoping someone can point me in the right
direction to get it going quicker.

TIA
Cheers
Nigel
 
If you put it into Before_Close it will run when another user closes th
workbook.

Why not use a Run command in your local macro
 
Back
Top