+ Reply to Thread
Results 1 to 4 of 4

Save As sub not saving

  1. #1
    Registered User
    Join Date
    01-07-2008
    Posts
    42

    Smile Save As sub not saving

    The dialog box comes up with file name formatted correctly and shows .xls as file type but when you choose save the dialog box disappears as if the file was saved but the file never gets saved. What am I doing wrong?

    Please Login or Register  to view this content.
    Thanks much for any help.
    Barry
    Last edited by imatomic; 12-31-2009 at 05:49 PM.

  2. #2
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Save As sub not saving

    I would avoid naming a sub SaveAs, since there is a method by that name.

    GetSaveAsFileName returns a path (a string), but doesn't actualy save the file.
    You could either:
    Add a bit that saves the workbook
    Please Login or Register  to view this content.
    or you could use the built in dialog
    Please Login or Register  to view this content.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  3. #3
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Save As sub not saving

    Hello Barry,

    The GetSaveAsFilename only returns the file name along with its directory path. It doesn't actually do the saving. You have to do that.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  4. #4
    Registered User
    Join Date
    01-07-2008
    Posts
    42

    Re: Save As sub not saving

    Thanks Mike

    I went with the first option and learned something along the way. Thank you very much for the help!

    Barry

+ 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