title: Select folder for save location
body: <p>I have a VBA macro with about 20 modules, which create separate spreadsheets in the workbook. They also save the individual spreadsheet created by each module of the macro into a specific folder on a shared drive. </p>
  
  <p>This is an example of a couple of lines that save the spreadsheet to the separate folder.</p>
  
  <pre><code>z = Format(DateTime.Now, "dd-MM-YYYY hhmm")
  wb.SaveAs "J:\AAAA\BBBB\CCCC\DDDD\mod1" &amp; z &amp; ".xlsx"
  Workbooks("mod1" &amp; z &amp; ".xlsx").Close savechanges:=True
  </code></pre>
  
  <p>However, as this file is now being shared out among a number of users, with different functions, the users now want to be able to set the location where the spreadsheets generated will be saved, on an individual basis.</p>
  
  <p>What I am looking for is some way for the macro to open a new window, and for the user to select a file path. That file path would then be stored into the macro so that each module can read the file location where it needs to be stored.</p>
  
  <p>Is this possible?</p>
  
  <p>Edit 1:</p>
  
  <p>I should have made a couple of things clearer. My apologies.</p>
  
  <p>The code above is replicated in every module. Also, all the modules are run from one overarching module, that calls the other.</p>
  
  <p>What I am looking for is a code that will allow the user to select the save location at the start of the overarching module. Eg. J\AAA\CCC\XXX. The modules, when called, will to retrieve the file path, and then save the file to that location.</p>