title: Macro for getting the file name from the cell and prompt the location to save the file
body: <p>I am looking for a macro which when run would take the value from the cell and save it using that name and also prompt for the path to save the file. The following is my attempt:</p>
  
  <pre><code>Sub SelectFolder()
      Dim diaFolder As FileDialog
  
      Set diaFolder = Application.FileDialog(msoFileDialogFolderPicker)
      diaFolder.AllowMultiSelect = False
      diaFolder.Show
      ActiveSheet.Copy
      ActiveWorkbook.SaveAs Filename:= _
      diaFolder &amp; ActiveSheet.[d2] &amp; ".xlsx", FileFormat:= _
      xlExcel8, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False _
  , CreateBackup:=False
  
  
      Set diaFolder = Nothing
  End Sub
  </code></pre>
  
  <p>In this the value is taken from the cell and there is a prompt to ask for the folder to save the file. But the file is not stored in the folder and stored in a separate folder. I guess there is a small correction that needs to be done here.</p>
  
  <p>Also while saving, it is giving me an warning that there may be compatibility issues from 97-2003 file type. I guess there is something that needs to be corrected in this line:</p>
  
  <pre><code>diaFolder &amp; ActiveSheet.[d2] &amp; ".xlsx", FileFormat:= _
          xlExcel8, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False 
  </code></pre>
  
  <p>but don't know what to change. I want the file to be in .xlsx and also compatible with all devices.</p>
  
  <p>Can anybody help me in doing these two?</p>