title: Accessing table data frequently
body: <p>I am trying to read a table from a worksheet and storing in an listobject. I need to use this table data multiple time and <strong>I dont want to access worksheet every time I need table data</strong>. I think accessing worksheet everytime will slow down the performance. 
  Also I need to refer table data based on header name. 
  I was thinking of writing something like this.</p>
  
  <pre><code>public Tbl_MyTable  as listobject
  public Arr as variant
  Set Tbl_MyTable = Workbooks("Myworkbook").worksheets("Myworksheet").ListObjects("Tbl1")
  tRows = Tbl_MyTable .DataBodyRange.Rows.Count
  for i=1 to 10
        config= ArrConfig(i)
        call readtable(tRows, config)
        Set Destination = workbooks("x").sheets("y").Range("A2")
        Destination.Resize(1,UBound(Arr, 1)).Value = Arr  
        'Create the table based on the populated data.
        Set populated_area = Destination.CurrentRegion
        Set Create_Table = .ListObjects.Add(xlSrcRange, populated_area, , xlYes)
        Create_Table.name = (.name &amp; "_tbl")
        Create_Table.TableStyle = "TableStyleMedium15" 
        'Select this newly created table and do some data reformating
        With ActiveSheet.ListObjects("" &amp; Tbl_name &amp; "").Range.Select 
            'Change entire Table font
         With Selection.Font
          .name = "Calibri Light"
          .Size = 10
          .Strikethrough = False
          .Superscript = False
          .Subscript = False
          .OutlineFont = False
          .Shadow = False
          .Underline = xlUnderlineStyleNone
          .ThemeColor = xlThemeColorLight1
          .TintAndShade = 0
          .ThemeFont = xlThemeFontMajor
      End With
  End with
  ...
  ...
  ...
  
  'Inside Sub readtable
  For i = 1 To tRows
  if config= A
       Arr(i) = Range("Tbl_MyTable[Header1]")(i).Value
  else if config =B
       Arr(i) = Range("Tbl_MyTable[Header2]")(i).Value
  else 
       Arr(i) = Range("Tbl_MyTable[Header3]")(i).Value
  end if
  .
  .
  </code></pre>
  
  <p>Problem is that it works only for first iteration of top level loop.
  Next time I get following error (Somehow I am getting multiple errors every time I run it. Not all appear everytime)</p>
  
  <pre>
  Run-time error '1004' : Method 'Range' of object'_Global' failed
  Error number: 90 Subscript out of range
  </pre>
  
  <p>Any idea what might be wrong here. I guess looking this code again and again I am hitting a wall now. I need another set of eyes to help me. </p>