title: How to browse for save directory?
body: <p>By clicking a button in Excel, the user exports a specific sheet to a csv with a dynamic filename and the csv is saved in a pre-determined directory.</p>
  
  <p>Instead of saving to a predetermined directory, can users have the browse window to choose a directory to save to?</p>
  
  <pre><code>Sub Export()
  Dim MyPath As String
  Dim MyFileName As String
  MyPath = "C:\importtest"
  
  MyFileName = "MR_Update_" &amp; Sheets("Monthly Review").Range("D3").Value &amp; "_" &amp; Format(Date, "ddmmyyyy")
  
  If Not Right(MyPath, 1) = "\" Then MyPath = MyPath &amp; "\"
  If Not Right(MyFileName, 4) = ".csv" Then MyFileName = MyFileName &amp; ".csv"
  
  Sheets("Export Data").Copy
  
  With ActiveWorkbook
  
      .SaveAs Filename:= _
        MyPath &amp; MyFileName, _
        FileFormat:=xlCSV, _
        CreateBackup:=False
  
      .Close False
  
  End With
  End Sub
  </code></pre>