title: Use VBA Macro to Save each Excel Worksheet as Separate Workbook
body: <p>Hi I am trying to use this code to save each sheet of Excel to a new workbook. However, it is saving the entire workbook to the new filename</p>
  
  <pre><code>Dim path As String
  Dim dt As String
  dt = Now()
  path = CreateObject("WScript.Shell").specialfolders("Desktop") &amp; "\Calendars " &amp; Replace(Replace(dt, ":", "."), "/", ".")
  MkDir path
  Call Shell("explorer.exe" &amp; " " &amp; path, vbNormalFocus)
  
  Dim ws As Worksheet
  For Each ws In ThisWorkbook.Worksheets 'SetVersions
      If ws.name &lt;&gt; "How-To" And ws.name &lt;&gt; "Actg_Prd" Then
          ws.SaveAs path &amp; ws.name, xlsx
      End If
  Next ws
  </code></pre>
  
  <p>What is the quick fix?</p>