When I click the first item in a multi-select listbox the first click triggers the clicked item as well as items around it.
I dug into why and added code to listen to the listbox selection changed event, adding only the selection changed listener and no code made it go away.
Private Sub AllListBox_SelectedIndexChanged
It comes back every so often. Maybe it has to do with the multiselect.
The values are added programmatically by looping through every header on the page and adding it as the value.
Dim InList As Boolean
For Each col In Range(DataRangeBox.Value).Cells
'Find the row with the headers on it
If col.row = Range(DataRangeBox.Value).Cells(1).row Then
'Add item to all available list box
If IsNull(AllListBox) Then
AllListBox.AddItem col.Text
End If
End If
Next col
Is it similar to the problem discussed here. Will adding the index explicitly solve the problem?