title: Method 'Copy' of object '_Worksheet' failed
body: <p>For the first time I now faced the error </p>
  
  <blockquote>
    <p>Method 'Copy' of object '_Worksheet' failed</p>
  </blockquote>
  
  <p>I heard that this is a quite common error but I was not able to find a solution. When I searched trough SO, I found many posts about the </p>
  
  <blockquote>
    <p>'Range' of object failed-Error.</p>
  </blockquote>
  
  <p>Is this error caused by memory limitations of the workstation or is it a software related error?</p>
  
  <p>Anyone got an idea to work around that problem?</p>
  
  <p>In case it is of interest that is my VBA code:</p>
  
  <pre><code>Private Sub CommandButton1_Click()
  MsgBox "Message"
  
    Dim wb As Workbook
    Set wb = Workbooks.Add(xlWBATWorksheet)
    wb.Sheets(1).Name = "deletethissheet"
  
    Dim ws As Worksheet
    For Each ws In ThisWorkbook.Worksheets
      ws.Copy After:=wb.Sheets(wb.Sheets.Count)
    Next
  
    For Each ws In wb.Worksheets
      ws.UsedRange.Formula = ws.UsedRange.Value
  
      Dim sh As Shape
      For Each sh In ws.Shapes
        sh.Delete
      Next
  
    Next
  
    For Each Link In wb.LinkSources(xlLinkTypeExcelLinks)
    wb.BreakLink Name:=Link, Type:=xlLinkTypeExcelLinks
    Next
  
    wb.Sheets("deletethissheet").Delete
    wb.SaveAs Replace(ThisWorkbook.FullName, ".xlsm", "_" &amp; Format(Date, "yyyymmdd") &amp; ".xlsx"), xlOpenXMLWorkbook
    wb.Close SaveChanges:=False
  
  End Sub
  </code></pre>
  
  <p><code>ws.Copy After:=wb.Sheets(wb.Sheets.Count)</code>
  Is the cause of the error.</p>