+ Reply to Thread
Results 1 to 5 of 5

GetSaveAsFilename in Excel 2003 2007 2010

  1. #1
    Registered User
    Join Date
    07-18-2013
    Location
    Yorkshire
    MS-Off Ver
    Excel 2010 / various
    Posts
    2

    GetSaveAsFilename in Excel 2003 2007 2010

    Hello everyone,
    My first day on the forum and my first post, so be gentle....

    Background: I have a spreadsheet that automates bill of material transfer to from Autodesk Inventor to Syspro ERP 6.1. Paste some data in one format to one sheet, VB script then changes the format to what is required in another sheet and pops up a save as dialogue box suggesting a file output type and filename.
    This works in Office 2003 (originally developed on this version) and Office 2007 (after upgrade). When I recently tried it on the end user's Office 2010 Windows 7 64 bit PC, it went through the motions, but the suggested filename was not filled in when the dialogue popped up. I did a small change suggested from the web (adding 'InitialFileName:=') and tried it again, no luck. First user's PC was busy so I tried it on another user's PC - again 2010 Windows 7 64 bit - and it worked! Went back to the first user's PC and it still doesn't work. Tried it on a third PC (Office 2010 Windows 7 64 bit) it doesn't work.
    To summarise:
    FileSaveName = Application.GetSaveAsFilename(InitialFileName:=FName, fileFilter:="Text (MSDOS) (*.TXT), *.TXT")
    works on one PC, but not on another PC with the same OS / Office version.
    I can't see (or think of any) reason why there should be a difference, but I'm hoping that minds greater than mine can advise.....

    regards,

    Peter

  2. #2
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: GetSaveAsFilename in Excel 2003 2007 2010

    change the 'Text (MSDOS) (*.TXT)' part to 'Text (MSDOS) (*.txt)' and try again (the case is important!)
    Last edited by JosephP; 07-18-2013 at 03:43 AM.
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  3. #3
    Forum Expert Debraj Roy's Avatar
    Join Date
    09-27-2012
    Location
    New Delhi,India
    MS-Off Ver
    Excel 2013
    Posts
    1,469

    Re: GetSaveAsFilename in Excel 2003 2007 2010

    Can you please check with this one.

    Application.FileDialog(msoFileDialogSaveAs) object - that will also do the same job..


    BTW.. Above code is working with me.. W7, 64 bit, Office 7
    Last edited by Debraj Roy; 07-18-2013 at 03:36 AM.
    Regards!
    =DEC2HEX(3563)

    If you like someone's answer, click the star to give them a reputation point for that answer...

  4. #4
    Registered User
    Join Date
    07-18-2013
    Location
    Yorkshire
    MS-Off Ver
    Excel 2010 / various
    Posts
    2

    Re: GetSaveAsFilename in Excel 2003 2007 2010

    Thanks for that Joseph, it worked a treat on all 3 machines, though I'm not entirely sure why....
    Still, a fix is a fix, and super quick response too.

    Thanks again,

    Peter

    I bow to your superior intellect :o)

  5. #5
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: GetSaveAsFilename in Excel 2003 2007 2010

    you're welcome :-)

    please don't forget to mark the thread solved (click the 'thread tools' link at the top, then 'mark solved')

+ 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. Excel find suddenly slow in 2003/2007 but not 2010
    By killieblues in forum Excel General
    Replies: 5
    Last Post: 12-05-2013, 11:38 PM
  2. [SOLVED] Multiple sumifs in Excel 2003, 2007,2010
    By mahmud9935 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-18-2012, 01:33 PM
  3. Code won't work in Excel 2003, but will in 2007/2010
    By Mak2145 in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 03-30-2012, 12:23 PM
  4. Excel 2010 and 2007 saving in 2003 Format
    By yawnzzzz in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-10-2011, 11:35 PM
  5. Protecting sheets in Excel 2003, 2007 and 2010
    By kensei in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-14-2011, 06:39 AM

Tags for this Thread

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