title: how to load the combobox and then how to use the selected value from it in vba?
body: <p>a question is : how to load a or give value to a combo box list and then call it in my worksheet and get the selected value from it ?i have a module that i want to call my userform1 which include the combobox in it . but when i debug the program it is just a show of the combo box . i think it doesn't do anything ... thanks for your time ..this is the code for user form:</p>
  
  <pre><code>Private Sub UserForm_Initialize()
  
  With ComboBox1
  
      .AddItem "weibull"
      .AddItem "log-normal"
      .AddItem "gambel"
      .Style = fmStyleDropDownList
  
  End With
  End Sub
  </code></pre>
  
  <p>and this is how i ask in my sub to show the combobox:</p>
  
  <pre><code>UserForm1.Show
  If ComboBox1.ListIndex = -1 Then
  MsgBox "There is no item currently selected.", _
  vbInformation, _
  "Combo Box Demo"
  Exit Sub
  End If
   MsgBox "You have selected " &amp; ComboBox1.List(ComboBox1.ListIndex) &amp; "." &amp; vbNewLine _
  &amp; "It has " &amp; ComboBox1.ItemData(ComboBox1.ListIndex) ", _
  vbInformation, _
  "Combo Box Demo"
  </code></pre>
  
  <p>the second part is what i found in net , but it made the program at least to show the combo box !</p>