title: Save excel worksheet to specific folder and filename based on same cell
body: <p>I am trying to save a copy of a worksheet to a specific folder based on cell B8 and name the .xlsx file based on the cell range B8 too. </p>
  
  <p>For example, a user first creates a new folder named "test1", &amp; then enters this folder name/text into cell "B8".  He/she will activate the macro after completing their work on the worksheet, &amp; it will save a copy to the folder named "test1" and name the .xlsx file as "test1".  (<em>So the .xlsx file will be named as "testfolder1" and the folder where it is stored is also called "test1"</em>)</p>
  
  <p>I am using the following code to save a copy of the worksheet to a folder. Just can't figure out how to include the cell B8 into the SaveAs line. Too new with VB to figure it out.</p>
  
  <pre><code>Sub SaveForm()
  
   exampleForm = Range("B8").Value
  
  Application.ScreenUpdating = False
  Application.DisplayAlerts = False
  
  ActiveSheet.Copy
  With ActiveWorkbook.ActiveSheet
      .Range("42:" &amp; Rows.Count).EntireRow.Delete xlShiftDown                      
      .Range(.Cells(1, "J"), .Cells(1, Columns.Count)).EntireColumn.Delete xlToRight   
      .Parent.SaveAs "C:\Users\JohnSmith\Desktop\ExtractedWorksheet\" &amp;  exampleForm &amp; ".xlsx"                 
      .Parent.Close False
  End With
  End Sub
  </code></pre>
  
  <p>Appreciate any input and hopefully my ending goal is understandable.
  -Thanks!</p>