title: VBA SaveAs Method
body: <p>After browsing forums for well over an hour, I can't seem to figure out why my save as code isn't working. </p>
  
  <p>My goal is to save a new copy of the workbook under a different file type. (The current file type is .csv.) I'm not trying to save in a new or different location, the current directory is where I want it to save to.</p>
  
  <p>I've tried more variations of the following code than I can remember, so I'll just post my current syntax:</p>
  
  <p><code>CurrentDir = CurDir()</code></p>
  
  <p><code>dateVal = Date</code></p>
  
  <p><code>ActiveWorkbook.SaveAs Filename:="" &amp; CurrentDir &amp; "ALS Week of " &amp; dateVal - 4 &amp; ".xlsx", FileFormat:=51</code></p>
  
  <p>I've looked at examples of how to open a dialog box wherein the user inputs information in order to save. But I'm hoping for a hands-off approach. If anyone can see where my error lies, please let me know! </p>
  
  <p><em>EDIT:</em>
   The error that I get is <code>"Method 'SaveAs' of object '_Workbook' failed</code> </p>