+ Reply to Thread
Results 1 to 6 of 6

Application.GetSaveAsFilename not populating derived filename

  1. #1
    Registered User
    Join Date
    07-04-2012
    Location
    Derby, England
    MS-Off Ver
    Excel 2013
    Posts
    34

    Application.GetSaveAsFilename not populating derived filename

    Hi, I wonder if someone can help.

    I am trying to get a piece of code save the current workbook as a derived filename, but the filename does not populate in the "File/Save As" window when i run the process. The filename displays in the msgbox just as I want it to. I've copied below an extract from the process. Can anyone help?

    Please Login or Register  to view this content.

  2. #2
    Valued Forum Contributor
    Join Date
    03-17-2012
    Location
    Warsaw, Poland
    MS-Off Ver
    2007/2010
    Posts
    555

    Re: Application.GetSaveAsFilename not populating derived filename

    same logic works for me allright:

    Please Login or Register  to view this content.
    Do you have write rights in the location(seeing "T:/" as the drive)? Does the file save at all but under a different name ?
    If you think that my answer was helpful, please click on the "Add to this user's Reputation" button.

  3. #3
    Registered User
    Join Date
    07-04-2012
    Location
    Derby, England
    MS-Off Ver
    Excel 2013
    Posts
    34

    Re: Application.GetSaveAsFilename not populating derived filename

    Yes I do have write rights. The process continues and completes if I then add a filename manually into the File/Save As window.

  4. #4
    Valued Forum Contributor
    Join Date
    03-17-2012
    Location
    Warsaw, Poland
    MS-Off Ver
    2007/2010
    Posts
    555

    Re: Application.GetSaveAsFilename not populating derived filename

    nvm. I think I got it all wrong.

    I guess your filename has some invalid characters or is too long (255 chars+)? What if you enter something simple as filename first:

    Please Login or Register  to view this content.
    If that works, then you know you have to work on the filename expression

    Here's what google says about the limitations (might not be all though):
    Reserved Characters and Names

    Most common characters can be used in naming files. However, the following characters are reserved and cannot be used in a file name:
    < > : " / \ | ? *
    Also, neither a space nor a period can be used at the end of a name. Further, files cannot have the following reserved device names: CON, PRN, AUX, NUL, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, and LPT9. Note that the case does not matter in Windows.
    Last edited by Bishonen; 11-20-2015 at 07:24 AM.

  5. #5
    Registered User
    Join Date
    07-04-2012
    Location
    Derby, England
    MS-Off Ver
    Excel 2013
    Posts
    34

    Re: Application.GetSaveAsFilename not populating derived filename

    "Test Workbook" worked fine.

    It does appear to be the character limit of 255 (I'm assuming this is the filepath and filename combined) as when I manually enter the filename I want and hit Save, the last 2 characters are cut off in the filename box, but yet the file is visible afterwards with the full name.

    I will experiment further by reducing the length of one of the folders that is part of the filepath.

  6. #6
    Registered User
    Join Date
    07-04-2012
    Location
    Derby, England
    MS-Off Ver
    Excel 2013
    Posts
    34

    Re: Application.GetSaveAsFilename not populating derived filename

    All sorted . . . It was the "." within "v3.0" at the end of the filename. I've replaced it with a "-" and all is working perfectly! Thanks for the guidance!

+ 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. Changing path for Application.GetSaveAsFileName
    By phi11yguy19 in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 12-29-2015, 06:39 PM
  2. Application.GetSaveAsFilename Issues on MAC
    By jblack6572 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-24-2015, 12:57 PM
  3. [SOLVED] Application.GetSaveAsFilename cancel
    By tomham in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-15-2012, 07:33 PM
  4. How to save as filename derived from a cell, and print 2 copies?
    By vettenfun in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-22-2011, 11:02 AM
  5. Application.GetSaveAsFilename
    By MGustafson in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-03-2009, 06:23 PM
  6. Application.GetSaveAsFilename
    By leighmills33 in forum Excel General
    Replies: 1
    Last Post: 03-21-2008, 12:14 PM
  7. a question about "Application.GetSaveAsFileName"
    By 12Keys in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-13-2006, 01:30 AM

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