title: Vba comboBoxes how to use the Index to get the value
body: <p>I have combo box in a userform and I would like to get the values of a combo box into an array first I need to use the index of the value in a combo box to populate the array but using the .listIndex=number gives me false here is my code any help appreciated</p>
  
  <pre><code>Private Sub countItemsOnThecombo()
  Dim itemOnCombo As Long
  Dim itemd As Integer
  Dim Comboarr() As String
  
  itemOnCombo = Me.ComboBox1.ListCount
  MsgBox "1The list count" &amp; itemOnCombo
  MsgBox "2with the index" &amp; UserForm1.ComboBox1.ListIndex = 0
  'ReDim Comboarr(itemOnCombo)
  'For itemd = 1 To UBound(Comboarr)
  'Comboarr(itemd) = Me.ComboBox1.ListIndex = itemd
  'MsgBox Comboarr(itemd) 'Me.ComboBox1.ListIndex = itemd 'Comboarr(itemd)
  'Next itemd
  
  
  End Sub
  </code></pre>