+ Reply to Thread
Results 1 to 2 of 2

save file path as string variable

  1. #1
    Registered User
    Join Date
    06-03-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    46

    save file path as string variable

    Hi,

    I am stuck with this bit of my code. Any help would be greatly appreciated!
    The macro I am running loops through a list of values, does some calculations and then generates a report of these calculations. After saving this report it loops back to the next value in my list and repeats the process. So far so good.

    I would like the saving to be automated, but I can't figure out how to do that.

    What I want is the following:

    'ask user for save folder (the destination in which all report files should be saved)
    'save this destination as a variable
    'do a bunch of stuf
    'generate report name
    'generate save path by pasting the destination variable and the report name (savefileas destination&"/"&reportname)
    'save it!

    I can't figure out how to get the destination-variable without any unnecessary lines attached.


    Do you guys have any suggestions?

    alternative link:
    http://www.mrexcel.com/forum/excel-q...-variable.html
    Last edited by schzuki; 02-20-2014 at 06:05 AM.

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: save file path as string variable

    Hi, schzuki,

    Your post does not comply with Rule 8 of our Forum RULES. Do not crosspost your question on multiple forums without including links here to the other threads on other forums.

    Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.

    Expect cross-posted questions without a link to be closed and a message will be posted by the moderator explaining why. We are here to help so help us to help you!

    Read this to understand why we ask you to do this, and then please edit your first post to include links to any and all cross-posts in any other forums (not just this site).

    http://www.mrexcel.com/forum/excel-q...-variable.html

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  3. #3
    Registered User
    Join Date
    06-03-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    46

    Re: save file path as string variable

    My bad! I wasn't aware of that...

+ 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. how to specify a file save path to a save macro
    By Solidstan in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-04-2013, 05:33 PM
  2. Macro to save sheet as CSV using a dynamic file name and file path
    By chris.tinta in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-15-2013, 10:45 AM
  3. Replies: 0
    Last Post: 01-27-2013, 12:13 PM
  4. [SOLVED] Save As Dialog Box - Default Path and File Name, User Selects Sub Folder from Default Path
    By christenprochaska in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-12-2012, 05:17 PM
  5. Use String Variables in File Path and create path if not existing
    By JanBang in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-26-2007, 09:04 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