+ Reply to Thread
Results 1 to 4 of 4

Filename Created with VBA Does Not Display In Save As Dialog Box

  1. #1
    Registered User
    Join Date
    01-07-2016
    Location
    FL, USA
    MS-Off Ver
    2007
    Posts
    22

    Question Filename Created with VBA Does Not Display In Save As Dialog Box

    PREFACE

    The following code successfully copies a worksheet in a workbook into a completely different workbook using a specific naming convention:

    Please Login or Register  to view this content.

    PROBLEM
    The issue I have is, the header across the top of Excel of the newly created workbook correctly shows the desired filename (e.g., "07.22.21-1643-UPL") but when I click on the Save As icon, the name of this file does not populate in the Save As dialog box. Instead, the File name: field is just empty (but the correct File Extension is selected, which is (*.txt)


    OBJECTIVE
    The end goal is for the user to choose what the destination directory will be when saving the document but have the name already populated such that they won't have to type the name in manually. What is missing from the code in order to achieve this functionality?

    Thanks in advance.


    P.S. - In accordance with forum rules, I am announcing that I've made this same post on the Mr. Excel's forum which yielded zero responses as of the time this thread was created.
    Last edited by censo; 07-22-2021 at 10:45 PM.

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Filename Created with VBA Does Not Display In Save As Dialog Box

    This prompts the user to select a folder then copies and saves the sheet.

    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Registered User
    Join Date
    01-07-2016
    Location
    FL, USA
    MS-Off Ver
    2007
    Posts
    22

    Re: Filename Created with VBA Does Not Display In Save As Dialog Box

    The code submitted works beautifully. I have one hurdle, however.

    I use the following code as an AutoRun to spin off a series of Private macros in succession. With the proposed code you provided, the user is automatically presented with the Save As dialog box without having the ability to review/alter the file first (plus, there would be additional files being created as well which may cause a conflict/issue or make it confusing when saving).

    Please Login or Register  to view this content.
    Is there a way for the 'Save As' dialog box to present itself with the filename already populated when the individual actually prompts for the Save vs. instantly when the new file is created?

  4. #4
    Registered User
    Join Date
    01-07-2016
    Location
    FL, USA
    MS-Off Ver
    2007
    Posts
    22

    Re: Filename Created with VBA Does Not Display In Save As Dialog Box

    This version of the code hit the nail right on the head, executing all the parameters I needed. I guess concatenating the file extension with the name enabled for the complete filename to populate in the Save As dialog box as I had intended it to.

    Please Login or Register  to view this content.
    Thanks for your engagement and contribution

+ 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. Trouble with parsing filename to file save as dialog box
    By TuboDieselOne in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-27-2018, 07:13 AM
  2. [SOLVED] Read out Filename and Save all Sheet as Filename.pdf
    By bluesurger in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-28-2014, 02:34 AM
  3. Save as dialog box, value from listbox in filename combined with text
    By Masun in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-15-2013, 08:53 AM
  4. Unselect filename i dialog box
    By lassebasse in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-28-2013, 10:53 AM
  5. Save as dialog with predefined filename does not save
    By a94andwi in forum Excel General
    Replies: 2
    Last Post: 04-20-2012, 03:23 AM
  6. Replies: 1
    Last Post: 05-12-2009, 04:39 AM
  7. Date Filename Save as Dialog Macro Thingy!!!!!!
    By Cobbcouk in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-31-2006, 01:50 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