title: Excel macro to save sheets as new macro enabled workbook
body: <p>So far I have this:</p>
  
  <pre><code>Sub new_book()
  
      Sheets(Array("Document Data", "Invoice data", "Summary", "Invoice")).Copy
      ActiveWorkbook.SaveAs Filename:=Range("D1") &amp; Format(Date, "ddmmyyyy") &amp; ".xlsx", FileFormat:=52
  
  End Sub
  </code></pre>
  
  <p>However I get runtime error 1004, which highlights the ActiveWorkbook line. What exactly is wrong? Thank you for your time.</p>