title: VBA error for a list box code
body: <p>I am trying to correct a VBA error for a code I created to show list box values into Excel. Can anybody help please?</p>
  
  <pre><code>Dim lbValue As Long
   lbValue = Summary.ListBoxes("BusinessOwnerListBox").Value
  
   Dim lbtext As String
   With Summary.ListBoxes("BusinessOwnerListBox").ControlFormat
      lbtext = .List(.Value)
   End With
  </code></pre>
  
  <p>List is multi select single and items are added by using Add Item. The items are showing in the form but the list value chosen does not carry into the spread sheet on running the code. </p>
  
  <p>Full Code </p>
  
  <pre><code>Private Sub CancelButton_Click()
  
   Unload Me
  
  End Sub
  
  Private Sub ClearButton_Click()
  
  Call UserForm_Initialize
  
  End Sub
  
  Private Sub InitialTermListBox_Click()
  
  End Sub
  
  
  Private Sub OKButton_Click()
  Dim emptyRow As Long
  
  'Make Summary active
   Summary.Activate
  
   'Determine emptyRow
   emptyRow = WorksheetFunction.CountA(Range("A:A")) + 1
  
  'Transfer information
   Cells(emptyRow, 1).Value = SupplierNameTextBox.Value
   Cells(emptyRow, 3).Value = GeneralDescriptionTextBox.Value
   Cells(emptyRow, 5).Value = DepartmentListBox.Value
   Cells(emptyRow, 6).Value = ContractStartDateTextBox.Value
   Cells(emptyRow, 7).Value = InitialTermListBox.Value
   Cells(emptyRow, 8).Value = RenewalTermListBox.Value
   Cells(emptyRow, 9).Value = PaymentTermsListBox.Value
   Cells(emptyRow, 10).Value = SelectionMechanismListBox.Value
   Cells(emptyRow, 11).Value = ValueOfContractTextBox.Value
  
   Dim lbtext As Variant
   lbtext = BusinessOwnerListBox.Value
   Worksheets("Summary").Cells(emptyRow, 4).Value = lbtext
  
  
  If SignedContractCheckBox.Value = True Then Cells(emptyRow, 2).Value =        SignedContractCheckBox.Caption
  
  End Sub
  
  
  Private Sub PaymentTermsListBox_Click()
  
  End Sub
  
  Private Sub RenewalTermListBox_Click()
  
  End Sub
  
  Private Sub SelectionMechanismListBox_Click()
  
  End Sub
  
  Private Sub UserForm_Click()
  
   End Sub
  
  Private Sub UserForm_Initialize()
  
  'Empty SupplierNameTextBox
   SupplierNameTextBox.Value = ""
  
  'Uncheck SignedContractCheckBox
   SignedContractCheckBox.Value = False
  
  'Empty GeneralDescriptionTextBox
   GeneralDescriptionTextBox.Value = ""
  
   'Empty BusinessOwnerListBox
   BusinessOwnerListBox.Clear
  
   'Fill BusinessOwnerListBox
  With BusinessOwnerListBox
      .AddItem ""
      .AddItem "Alison Gillies"
      .AddItem "Bernard Hunwick"
      .AddItem "Jon Williams"
      .AddItem "Laurent Sylvestre"
      .AddItem "Leeann McCallum"
      .AddItem "Sue Lowe"
  End With
  
   'Empty DepartmentListBox
   DepartmentListBox.Clear
  
  'Fill DepartmentListBox
   With DepartmentListBox
   .AddItem ""
   .AddItem "Buildings"
   .AddItem "Corporate Services"
   .AddItem "ICT"
   .AddItem "People &amp; Culture"
   .AddItem "Transport &amp; Logistics"
   End With
  
  'Empty ContractStartDateTextBox
    ContractStartDateTextBox.Value = ""
  
   'Empty InitialTermListBox
    InitialTermListBox.Clear
  
   'Fill InitialTermListBox
   With InitialTermListBox
   .AddItem ""
   .AddItem "6"
   .AddItem "12"
   .AddItem "18"
   .AddItem "24"
   .AddItem "36"
  End With
  
   'Empty RenewalTermListBox
    RenewalTermListBox.Clear
  
   'Fill RenewalTermListBox
    With RenewalTermListBox
   .AddItem ""
   .AddItem "6"
   .AddItem "12"
   .AddItem "18"
   .AddItem "24"
   .AddItem "36"
   End With
  
  'Empty PaymentTermsListBox
   PaymentTermsListBox.Clear
  
  'Fill PaymentTermsListBox
   With PaymentTermsListBox
   .AddItem ""
   .AddItem "7 days"
   .AddItem "30 days"
   .AddItem "20th month"
   .AddItem "Quarterly"
   .AddItem "Annual"
   End With
  
  'Empty SelectionMechanismListBox
   SelectionMechanismListBox.Clear
  
  'Fill SelectionMechanismListBox
   With SelectionMechanismListBox
   .AddItem ""
   .AddItem "RolledContract"
   .AddItem "RFP"
   .AddItem "RFQ"
   .AddItem "3 Quotes"
   .AddItem "2 Quote"
   .AddItem "Business Selection"
   End With
  
  'Empty ValueOfContractTextBox
    ValueOfContractTextBox.Value = ""
  
  
   'Set Focus on SupplierNameTextBox
    SupplierNameTextBox.SetFocus
  
  
   End Sub
  </code></pre>