View Single Post
 
Old 08-28-2018, 04:46 PM
eduzs eduzs is offline Windows 10 Office 2010 32bit
Expert
 
Join Date: May 2017
Posts: 266
eduzs is on a distinguished road
Default

Apparently there is no solution to this.
I've found a workaround by my self, I add a double " " blank space in each list item so that the value typed in the combo box never matches a value in the drop down list that will ensure that the click event will always work.
In the Change event I alway remove the extra blank spaces to return the combobox value to the actual value.

Thanks!

For collaboration purposes only, here's some parts of my code:

Quote:
Private Sub CB1_Change()

With CB1
If .Value <> "" And .ListIndex <> -1 Then
.Value = Replace(.Value, " ", "")
Call ModMain.RunMySub
End If
End With

End Sub

Private Sub CB1_Keyup(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)

If Right(CB1, 1) = " " And KeyCode = 32 Then KeyCode = 0

If KeyCode = 13 Then
With CB1
If .ListCount = 1 Then
.ListIndex = 0
CB1_Change
End If
End With
Else
Call ModMain.FilterTheComboBox
End If

End Sub
__________________
Backup your original file before doing any modification.
Reply With Quote