在窗体上画一个名称为 Combo1 的组合框,然后画两个名称分别为 Label1 、 Label2 ,标题分别
Private Sub Combol_KeyPress(KeyAscii As Integer)
If KeyAscii=13 Then
For i=0 To Combo1 ListCount-1
If Combo1 Text= 【 12 】 Then
Label2 Caption=" 输入项已在组合框中。 "
Exit Sub
End If
Next i
Label2 Caption=" 已成功添加新输入项。 "
Combo1 ______ Combo1 Text
End If
End Sub