title: Excel VBA populate array from named range
body: <p>I need to populate an array's values with cells from a named range in another workbook. So far what I have is not working for me:</p>
  
  <pre><code>Dim vArray() as Variant
  vArray = Workbooks("Book2").Worksheets("Sheet1").Range("myRange")
  
  Debug.Print vArray(1) 'yields error
  </code></pre>
  
  <p>Also no luck with:</p>
  
  <pre><code>vArray = Workbooks("Book2").Names("myRange")
  </code></pre>
  
  <p>or</p>
  
  <pre><code>vArray = Workbooks("Book2").Names("myRange").RefersToRange
  </code></pre>