title: Method 'SaveAs' of object '_Workbook' failed VBA
body: <p>I have a workbook that is connected to a database and when you refresh the workbook, it refreshes your data in the workbook. Afterwards a macro is ran to save the new (raw) data in two different locations, then the macro will do analysis on that raw data, and save the same workbook later on in 4 other locations.
  When I am trying to do the first save of the raw data, I am able to save to the first location, but when it moves to the second location I am getting the error: Run-time error '1004': Method 'SaveAs' of object '_Workbook' failed. Both of the locations are valid locations.</p>
  
  <p>Here is one sub in the macro that does the first file save:</p>
  
  <pre><code>Sub saveraw()
  
  Dim rdate As String
  Dim rawfilename As String, rawfilename1 As String
  Dim mywb As Workbook
  
  Set mywb = ActiveWorkbook
  
  rdate = Format(Now(), "mm-dd-yy")
  
  rawfilename = "\\sw\mes\PS\SC\SCM_Supply_Execution\Spares\This Weeks Number Database\This Weeks Numbers(raw) " &amp; rdate &amp; ".xlsm"
  rawfilename1 = "\\sw\mes\PS\SC\SCM_Shared\Spares Reports\This Weeks Numbers(raw) " &amp; rdate &amp; ".xlsm"
  
  mywb.Save
  
  Worksheets("Sheet2").Range("A2") = Null
  
  Application.DisplayAlerts = False
  
  mywb.SaveAs Filename:=rawfilename
  mywb.SaveAs Filename:=rawfilename1
  
  Application.DisplayAlerts = True
  
  End Sub
  </code></pre>
  
  <p>I have also tried using the method of</p>
  
  <pre><code>ActiveWorkbook.SaveAs
  </code></pre>
  
  <p>in place of both of the mywb.SaveAs, but that did not work either.</p>