Private Sub Combo1_Change()
Dim A As Integer If CancelSearch = True Then Exit Sub For A = 0 To Combo1.ListCount - 1 If Combo1.Text = Left(Combo1.List(A), Len (Combo1.Text)) Then oldText = Combo1.Text Combo1.Text = Combo1.Text & Right(Combo1.List(A), Len(Combo1.List(A)) - Len(Combo1.Text)) Combo1.SelStart = Len(oldText) Combo1.SelLength = Len(Combo1.Text) - Len(oldText) End If Next A End Sub Private Sub Combo1_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = vbKeyBack Or KeyCode = vbKeyDelete Then CancelSearch = True Else CancelSearch = False End If End Sub Private Sub Command1_Click() Combo1.AddItem Combo1.Text End Sub Private Sub Command2_Click() Combo1.Clear End Sub Inserite nel vostro progetto 1 combobox 2 command buttons command1.caption="add item" command2.caption="clear" |