Auto fills the combo box as you type in, from the drop down list of the combo box
Auto fills the combo box as you type in, from the drop down list of the combo box
Rate Auto fills the combo box as you type in, from the drop down list of the combo box
(2(2 Vote))
'Private Sub cboEvaluators_Change()
' Call Proc_ComboAutoFill(cboEvaluators)
'End Sub
' where cboEvaluators is the combo box filled with a list of items
Public Sub Proc_ComboAutoFill(cboCtl As Control)
Dim i As Integer
Dim szEntry As String
If cboCtl.SelStart = 0 Then
szEntry = cboCtl.Text
Else
szEntry = left$(cboCtl.Text, cboCtl.SelStart)
End If
If IsNull(szEntry) Then Exit Sub
If cboCtl.ListCount = 0 Then Exit Sub
Do
i = Func_BinaryListSearch(cboCtl, szEntry)
If i <> -1 Then
cboCtl.ListIndex = i
cboCtl.SelStart = Len(szEntry)
cboCtl.SelLength = Len(cboCtl.List(i)) - Len(szEntry)
Exit Sub
Else
If Len(szEntry) <= 1 Then
cboCtl.ListIndex = 0
Exit Sub
Else
szEntry = left$(szEntry, Len(szEntry) - 1)
End If
End If
Loop
End Sub
Auto fills the combo box as you type in, from the drop down list of the combo box Comments
No comments yet — be the first to post one!
Post a Comment