+ Reply to Thread
Results 1 to 4 of 4

GetSaveAsFilename doesn't save a file

  1. #1
    Registered User
    Join Date
    05-09-2010
    Location
    US
    MS-Off Ver
    Excel 2003
    Posts
    41

    GetSaveAsFilename doesn't save a file

    I have the following code in a macro:
    Please Login or Register  to view this content.
    When it runs, it appears to do everything I want it to do. It opens a "Save As" window, the "Save as type:" is prefilled with "Text Files (*.csv)", however, when I change the file name and click "Save," it doesn't actually save anything in the folder.

    Any help would be greatly appreciated.
    Last edited by SinGin; 12-10-2010 at 10:38 AM.

  2. #2
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: GetSaveAsFilename doesn't save a file

    No, it doesn't save - it's not supposed to. All it does is return a filename for you to then check and save as appropriate.
    Remember what the dormouse said
    Feed your head

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: GetSaveAsFilename doesn't save a file

    Hi,

    You're misunderstanding the use the GetSaveAsFileName instruction. Having established the filename that you want to use you need to then do something with it. i.e. use a .SaveAs Filename instruction. Assuming you're wanting to save the Active Workbook but with the name you choose use:

    Please Login or Register  to view this content.
    HTH
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Registered User
    Join Date
    05-09-2010
    Location
    US
    MS-Off Ver
    Excel 2003
    Posts
    41

    Re: GetSaveAsFilename doesn't save a file

    Yes, you are absolutely correct. I was misunderstanding the use of the instruction. But that is what I do best. Thanks a lot for your help, it worked perfectly!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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