I have an Excel template that does almost what I want; there are formulas, etc., in it, and a VBA macro that writes out one of the worksheets as csv so that I can process it in another program.

I would like something to run when I create an Excel file using this template that will get the current date and time, create part of a filename based on that, check to see if the file already exists, possibly ask the user whether to overwrite it, etc.

I *think* what I want is for a macro to run when I create the workbook from the template. I am certainly willing to do it other ways, but the complexity of what I want to do suggests some VBA code, and the fact that it is based on an event similar to workbook-open leads me to think I'll end up with something like that.

I've tried app_workbookopen; it doesn't run when I create file from the template, only when I open the template. I suppose if there's a way to have the macro run when the template is opened and a way for the resulting macro to create the file from the template, I might work it that way. It doesn't seem as clean, but again I'm willing to consider different methods.

Anybody got ideas?

tia,
rc