+ Reply to Thread
Results 1 to 9 of 9

Double Click vs Open XLTM

  1. #1
    Registered User
    Join Date
    12-30-2013
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    40

    Unhappy Double Click vs Open XLTM

    I have this XLTM that reads via sql some records from two files, and should save them in an Excel worksheet (XLSX) on two tabs, via

    I am trying to retrieve the Path where the XLTM is located; and have the XLSX saved there.

    If the XLTM is opened via double click. The Path is defined as the Default File Path (Application.DefaultFilePath) but this is NOT where the XLTM is really located. If I Open it via OPEN, the path is retrieved correctly:

    Please Login or Register  to view this content.
    I ran of Ideas of what to do.

    Thanks in advance.

    Ernesto

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Double Click vs Open XLTM

    When you double click a template file (xltm) you create a new workbook based on the template.

    That new workbook won't really have a path until its saved.

    Is the file meant to be a template?
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    12-30-2013
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    40

    Re: Double Click vs Open XLTM

    I am trying to save the new XLSX where the Template is locate. Having trouble retrieving the Path Name; Looking into "FileSystemObject".

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Double Click vs Open XLTM

    Ernesto

    Do you actually want to use a template file?

  5. #5
    Registered User
    Join Date
    12-30-2013
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    40

    Re: Double Click vs Open XLTM

    I changed the file format to be XLSM; seems to work now, but I am having other issues, to be posted on another thread.

    Thanks.

  6. #6
    Registered User
    Join Date
    12-30-2013
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    40

    Re: Double Click vs Open XLTM

    I am curious if there is a way to retrieve the correct Path for the Template (xltm) being run.

  7. #7
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Double Click vs Open XLTM

    You could try CurDir.

  8. #8
    Registered User
    Join Date
    12-30-2013
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    40

    Re: Double Click vs Open XLTM

    That gives me the value in DefaultFilePath.

  9. #9
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Double Click vs Open XLTM

    There is no built-in way/property to get the path/name of the template a workbook is based on.

    Why do you want the path anyway?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Calendar open with a double click
    By nik7 in forum Excel General
    Replies: 8
    Last Post: 04-08-2013, 07:54 AM
  2. files do not open with double click
    By mgrimz in forum Excel General
    Replies: 2
    Last Post: 04-14-2006, 08:10 PM
  3. Double Click will not open my Workbook
    By Stacy in forum Excel General
    Replies: 3
    Last Post: 04-13-2006, 02:10 PM
  4. can't open file by double click
    By Mike Morn in forum Excel General
    Replies: 1
    Last Post: 11-16-2005, 01:52 PM
  5. [SOLVED] why do 5 workbooks open when I double click one
    By dnlighting in forum Excel General
    Replies: 2
    Last Post: 08-15-2005, 04:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1