View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Nigel[_8_] Nigel[_8_] is offline
external usenet poster
 
Posts: 172
Default Template Macro Execution

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




----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! 100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---