title: VBA - Saving multiple copies of a workbook with a specific naming convention
body: <p>I have code below to save the current workbook and attach today's date to the end of the file name. How would I modify the code so if two copies of the workbook were to be saved on the same day, the first one would save normally as "<strong>Workbook Name, Today's Date.xlsm</strong>" and the second one would save as "<strong>Workbook Name, Today's Date Copy 2.xlsm</strong>".  Same thing if the workbook were to be saved 3,4,5 times a day they should save as Copy 3,4,5,etc...</p>
  
  <pre><code>Sub Save_Workbook()
  
  Const Path = "H:\HR\Cole G\Timehseet Test Path\"
  Dim FileName As String
  Dim Pos As Long
  
  Pos = InStrRev(ActiveWorkbook.Name, ".") - 1
  ' If there wasn't a ".", then the file doesn't have an extension and Pos = -1
  
  If Dir(Path &amp; Left(ActiveWorkbook.Name, Pos) &amp; Format(Now, "d-mm-yyyy") &amp; Mid(ActiveWorkbook.Name, Pos + 1)) &lt;&gt; "" Then
      ActiveWorkbook.SaveAs FileName:=Path &amp; Left(ActiveWorkbook.Name, Pos) &amp; "copy 2" &amp; Mid(ActiveWorkbook.Name, Pos + 1)
  Else
      ActiveWorkbook.SaveAs FileName:=Path &amp; Left(ActiveWorkbook.Name, Pos) &amp; Format(Now, "d-mm-yyyy") &amp; Mid(ActiveWorkbook.Name, Pos + 1)
  
  End If
  End Sub
  </code></pre>