title: VBA code with Object required error
body: <p>Code has error. When I debug, it shows the error of last line.    </p>
  
  <pre><code>Sub test()
      WB_Master = ActiveWorkbook.Name
      Dim ra As Range
      open file
      Workbooks.Open FileName:="X:\Projects\RPOC\Comparison\book1.xlsx"
      WB_Source = ActiveWorkbook.Name
      Workbooks(WB_Source).Activate
      Worksheets("sheet1").Activate
      ' set value to ra. Is it correct?
      Set ra = Range("c2")
  
      Workbooks(WB_Source).Close SaveChanges:=False
  
  
      Workbooks(WB_Master).Activate
  
      Worksheets("sheet1").Activate
  
      Set Range("k2").Value = ra.Value
  
  End Sub
  </code></pre>