title: How to save Specific worksheets from a workbook using VBA?
body: <p><strong>Objective:</strong></p>
  
  <ol>
  <li>To save specific worksheets in a workbook as unique CSV files</li>
  </ol>
  
  <p><strong>Conditions:</strong></p>
  
  <ol>
  <li>To save specific worksheets (plural) from a workbook that contains both the specific worksheets and extraneous worksheets (e.g. to save specific 10 out of 20 available worksheets)</li>
  <li>Insert the current date into the CSV's file name in order to avoid overwriting files currently in the save folder (this VBA is run daily)</li>
  <li>File name syntax:  CurrentDate_WorksheetName.csv</li>
  </ol>
  
  <p>I've found VBA code that gets me half way to my goal. It saves ALL worksheets in the workbook but the file name is not dynamic with the current date.</p>
  
  <p><strong>Current Code:</strong></p>
  
  <pre><code>Private Sub SaveWorksheetsAsCsv()
  
  Dim WS As Excel.Worksheet
  Dim SaveToDirectory As String
  Dim DateToday As Range
  
  
  Dim CurrentWorkbook As String
  Dim CurrentFormat As Long
  
  
  CurrentWorkbook = ThisWorkbook.FullName
  CurrentFormat = ThisWorkbook.FileFormat
  ' Store current details for the workbook
  SaveToDirectory = "S:\test\"
  For Each WS In ThisWorkbook.Worksheets
      Sheets(WS.Name).Copy
      ActiveWorkbook.SaveAs Filename:=SaveToDirectory &amp; WS.Name &amp; ".csv", FileFormat:=xlCSV
      ActiveWorkbook.Close savechanges:=False
      ThisWorkbook.Activate
  Next
  
  Application.DisplayAlerts = False
  ThisWorkbook.SaveAs Filename:=CurrentWorkbook, FileFormat:=CurrentFormat
  Application.DisplayAlerts = True
  ' Temporarily turn alerts off to prevent the user being prompted
  '  about overwriting the original file.
  
  End Sub
  </code></pre>