Setting Default Location for File/Save in Code for Excel

Posted on 2004-10-21
Last Modified: 2010-04-17
I would like to set the File/Save path for a spreadsheet. I run several macros, then I prompt the user to save the modified version of the file. There are several iterations of this process, each compiles different data and needs to be saved with a slightly different name, but in a similar location. THe path is nested a bit deep. I don't want to change the general Excel default file location.

Can I present the user with an opened File/Save As dialog box, where the path has been set and they just need to modifiy the file name a bit then click save?

Thank you!
Question by:janderson131
    LVL 1

    Accepted Solution

    I should change the name to a sequence in the save location, so each new file gets a new filename.
    apart from that you can store the original entered filename of the user in a database or file. when the user later on wants to download the file, you can use this text file or database table to. identify the files again.

    Author Comment

    If I ask the user to enter the    filename in a control, can I then concatenate that as a part of the full file path and name, then automate the saving of the file like that?

    LVL 1

    Expert Comment

    I think you can do that, but that's a little tricky, because you never know what your user will enter. this might cause unexpected errors. if you generate an automatic filename, you can ensure that the filename meets the standards for a filesystem.

    Author Comment

    OK, thanks!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Learn The Basics of Ethical Hacking & Pen Testing

    Computer and network security is one of the fastest growing and most essential industries in technology, meaning companies will pay big bucks for ethical hackers. This is the perfect course to leap into this lucrative career, learning how to use ethical hacking to reveal ...

    Suggested Solutions

    Title # Comments Views Activity
    Adobe Customization Wizard XI issues 26 110
    tenRun challenge 28 51
    Using YubiKey with REST API application 2 29
    count7 challenge 12 27
    Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
    Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
    Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
    In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

    856 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now