I know that when a template xltm file is opened as
New, Excel will change the name to template1 and because I have macros defined the file format to
xlOpenXMLWorkbookMacroEnabled. I would like to have some VBA macros to do some things when the file is first opened as New template. I know that the Workbook_Open or Auto_open macros run on open, but I can't figure out how to detect if this is the template
New Open.
I thought of one of the following would enable me to do this:
- Is there a built in way to detect when a template *.xltm file is first opened as New?
- I thought of putting something in a cell in a worksheet and then having the Auto_open or Workbook_Open code change it if the fileformat is not a template. But this seemed like a kludge.
Any other options?
Thanks
John