title: Run-time error '9': Subscript out of range
body: <p>I am trying to copy one column from a workbook to another workbook. This is my code and the error I am getting. </p>
  
  <blockquote>
    <p>(Run-time error '9': Subscript out of range)</p>
  </blockquote>
  
  <pre><code>Sub CopyColumn()
  Dim sourceColumn As Range, targetColumn As Range
  
  Set sourceColumn = Workbooks("source").Worksheets("a").Columns("H")
  Set targetColumn = Workbooks("copyto").Worksheet("HCM_FBL_Person_Template_Sample_").Columns("A")
  
  sourceColumn.Copy Destination:=targetColumn
  End Sub
  </code></pre>