+ Reply to Thread
Results 1 to 5 of 5

SaveAs workbook with prompt and autofilled name

  1. #1
    Registered User
    Join Date
    05-19-2016
    Location
    London
    MS-Off Ver
    2016
    Posts
    2

    SaveAs workbook with prompt and autofilled name

    Hi,

    I am currently working on a bit of code that prompts the user to a SaveAs form that has a prepopulated Filename coming from a cell in the workbook. The user should be able to choose the path to which the WB is saved. After that the wb should close and the display should switch to another workbook.

    The problem is that the NewWB is not actually saved. Can anyone help, please?

    Here my code:
    Please Login or Register  to view this content.
    Last edited by 6StringJazzer; 05-23-2016 at 11:55 AM. Reason: code tags

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,818

    Re: SaveAs workbook with prompt and autofilled name

    There is no code there that saves the workbook. This additional line will save the active workbook--is that the one you want to save?

    Please Login or Register  to view this content.
    Moderator's note: Please take the time to review our rules. There aren't many, and they are all important. Rule #3 requires code tags. I have added them for you this time because you are a new member. --6StringJazzer
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    05-19-2016
    Location
    London
    MS-Off Ver
    2016
    Posts
    2

    Re: SaveAs workbook with prompt and autofilled name

    Hi Jeff,

    Thank you for your quick response and for reminding me of rule #3 - I must have overseen that one in the heat of the moment.

    The code works as in that I do not get any error msg. However, the file that is saved does not have the appropriate name: the file is saved as FALSE.xlsx instead of NewWB_ + value from J1. Do you have an idea how to fix this?

    Many thanks,
    Dominik

  4. #4
    Valued Forum Contributor
    Join Date
    01-03-2016
    Location
    Conwy, Wales
    MS-Off Ver
    2016
    Posts
    974

    Re: SaveAs workbook with prompt and autofilled name

    another way to achieve what you want

    Please Login or Register  to view this content.
    If a response has helped then please consider rating it by clicking on *Add Reputation below the post
    When your issue has been resolved don't forget to mark the thread SOLVED (click Thread Tools at top of thread)

  5. #5
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,818

    Re: SaveAs workbook with prompt and autofilled name

    Quote Originally Posted by dombish View Post
    ...the file is saved as FALSE.xlsx instead of NewWB_ + value from J1. Do you have an idea how to fix this?
    This suggests that the user is hitting Cancel instead of selecting a folder. That's the only way I can think of that sFileSaveName can be FALSE.

    Kevin# also has a good alternative.

+ 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. Check if formula is autofilled
    By kimrh in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-04-2015, 06:23 AM
  2. [SOLVED] Disable Prompt when SaveAs (New Workbook)
    By ntitled in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 03-06-2014, 05:23 PM
  3. Export active worksheet as CSV with SaveAs prompt
    By GFIJames in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-13-2013, 08:48 AM
  4. use existing creation date of workbook with newly created .saveas workbook
    By dwr0211 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-04-2011, 12:42 PM
  5. How can do a saveAs w/o getting a prompt?
    By gpsmith in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-24-2009, 01:22 PM
  6. Help with SaveAs prompt
    By juggler in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-03-2006, 04:35 PM
  7. Unexpected SaveAs prompt for workbooks with pivot tables
    By KentL in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-07-2005, 06: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