Using XLTM file in place of an XLT file RRS feed

  • Question

  • I have a third party application that gathers data into worksheets using an .xlt (Template) file then renames it as an .xls file to match a particular batch of data.

    This issue is that I need to execute (Automatically) several macros on opening the resultant .xls file so that I can sort data, remove duplicates, fix errant time data, etc.

    I have the macros defined in an xltm template and they operate properly but the external application is expecting to use an xlt template.  If I just simply change the extension on the .xltm file to .xlt (Using Explorer) the external application hools into the template and attemps to produce an .xls output file but stumbles when Excel will not automatically let the .xls file be save with imbeded macros.

    I can't change the third part application (Its part of a dll) so I am stuck with somehow forcing Excel to save a .xls file with macros.

    Any help would be appreciated.

    Sunday, February 3, 2013 5:32 PM

All replies

  • You would need the dll to save either as xlsm or to save in 2003 format where .xls can contain macros.

    Alternatively you can keep the macros in a separate and run them from there, you just wouldn't be able to have them run automatically.

    Rod Gill

    The one and only Project VBA Book

    Rod Gill Project Management

    Monday, February 4, 2013 8:48 AM
  • Rod,

    Thanks for your repoy.  I am moving on to a single file that will manage the raw output and apply the macros after the raw data is produced.

    Thanks for your help

    Monday, February 4, 2013 1:55 PM