title: Excel VBA Copy Range Transpose from Another Spreadsheet
body: <p>I want to copy a range from a workbook and transpose it into my current sheet. </p>
  
  <p>Why would I get a "Subscript out of range" error on this line:</p>
  
  <blockquote>
    <p>Workbooks("Libraries\Documents\Book1.xlsx").Worksheets("Sheet1").Range("A1:A5").Copy</p>
  </blockquote>
  
  <pre><code>Sub PasteSpecial_Examples()
  'https://stackoverflow.com/questions/8852717/excel-vba-range-copy-transpose-paste
  'https://www.excelcampus.com/vba/copy-paste-cells-vba-macros/
  
      Workbooks("Libraries\Documents\Book1.xlsx").Worksheets("Sheet1").Range("A1:A5").Copy
      ActiveSheet.Range("A1").PasteSpecial Transpose:=True
  
  End Sub
  </code></pre>