title: Populate ComboBox from Table
body: <p>I'm trying to populate a two column combo box I am using in a user form taking the data from a Table. The combo list needs to be dynamic so when additional items are added to the Table they are fed into the combination box.</p>
  
  <p>I'm using a before event double click to initiate the code but the form is not initialising. The form has initialised using a simpler approach taking data from a fixed range - the Table is throwing me. </p>
  
  <p>I have run the code separately and I can see the combolist array getting populated. </p>
  
  <p>I have tried to redim the combolist array but an error comes up saying it is already dim'd.  </p>
  
  <p>I suspect I'm overcomplicating the code to populate the combobox from a Table.</p>
  
  <pre><code>Private Sub UserForm_Initialize()
  
  'Populate Combo list values
  
  ComboBox1.ColumnCount = 2
  
  Dim myTable As ListObject
  Dim myArray As Variant
  Dim x As Long, NumItems As Long
  
  Set myTable = Worksheets("RefTable").ListObjects("AccountTable")
  
  myArray = myTable.DataBodyRange
  NumItems = UBound(myArray)
  
  Dim ComboList(1 To 20, 1 To 2) As String
  
  Dim i As Integer, j As Integer
  
  For i = 1 To 20
      For j = 1 To 2
         ComboList(i, j) = myArray(i, j)
      Next j
  Next i
  
  ComboBox1.List = ComboList
  
  End Sub
  </code></pre>
  
  <p>The form is not showing at all!</p>