+ Reply to Thread
Results 1 to 3 of 3

Default GetSaveAsFilename extension?

  1. #1
    Registered User
    Join Date
    11-15-2012
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    23

    Default GetSaveAsFilename extension?

    I'm writing a macro which I want to run on all versions of Excel from 2000 upwards. At one point the user is asked to specify a spreadsheet to use for the macro output and I'm using a GetSaveAsFilename dialog for this. The GetSaveAsFilename set up specifies a default filename but I want the file extension to vary according to the version of Excel being used - ie save as .xls if using 2003 or earlier or as .xlsx if using 2007 or later.

    Here is the vba statement as I have it:

    Please Login or Register  to view this content.
    This dialog always makes the default filename in the File name box as "ppt title list.xls" (you might be able to guess what the macro does) even when using Excel 2010. How can I alter my GetSaveAsFilename so that the default file extension is .xls for Excel 2003 and earlier and .xlsx for 2007 and later?

    Grateful for advice.

  2. #2
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: Default GetSaveAsFilename extension?

    You may check the version of the application:
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    11-15-2012
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    23

    Re: Default GetSaveAsFilename extension?

    Thank you. That has solved it.

+ 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. Replies: 1
    Last Post: 03-11-2013, 07:19 PM
  2. [SOLVED] GetSaveAsFilename default file name problem
    By Gzdnkh in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-23-2012, 04:46 AM
  3. GetSaveAsFilename
    By DonHuff in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-07-2009, 04:31 AM
  4. GetSaveAsFilename
    By Steel Monkey in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-27-2007, 11:01 PM
  5. [SOLVED] GetSaveasFileName
    By Libby in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-08-2005, 03: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