title: Excel Pastespecial VBA
body: <p>I am attempting to copy the contents of a certain workbook to another. However, I indent to keep the source formatting. However, my code produces application/object not defined errors. 
  Any help would be much appreciated.</p>
  
  <pre><code>Public Sub CommandButton1_Click()
  Worksheets("Sheet1").Range("A2:D349").Copy Destination:=Worksheets("Sheet6").Range("A2")
  Worksheets("Sheet1").Range("A2:D349").PasteSpecial Paste:=xlPasteFormats
  End Sub
  </code></pre>