Sub
Combo1_Change()
Dimi
AsInteger, start
AsInteger
=
Len(Combo1
.
Text)
Fori
=
0
ToCombo1
.
ListCount
-
1
If
Left(Combo1
.
List(i), start)
=Combo1
.
Text
Then
.
Text
=Combo1
.
List(i)
End
If
Next
.
SelStart
=start
.
SelLength
=
Len(Combo1
.
Text)
End
Sub
FunctionSendMessage Lib
"
user32
"Alias
"
SendMessageA
"_
ByValhwnd
AsLong,
ByValwMsg
AsLong, _
ByValwParam
AsLong, lParam
AsAny)
AsLong
Private
ConstCB_ERR
AsLong
=(
-
1)
Private
ConstCB_SELECTSTRING
AsLong
=
&H14D
Private
Sub
Combo1_Change()
Dimstart
AsInteger
=
Len(Combo1
.
Text)
If
SendMessage(Combo1
.
hwnd, CB_SELECTSTRING,
ByValCombo1
.
ListIndex,
ByValCombo1
.
Text)
<
>CB_ERR
Then
.
SelStart
=start
.
SelLength
=
Len(Combo1
.
Text)
End
If
End
Sub