combobox 可以编辑:
Private Declare Function SendMessageLong Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
Private Sub Combo1_Change()
SendMessageLong Combo1.hwnd, &H14F, True, 0
End Sub
Private Sub Combo1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then Combo1.AddItem Combo1.Text
If KeyCode = vbKeyDelete Then Combo1.RemoveItem Combo1.ListIndex
End Sub
Dim i As Integer
Dim j As Integer
Dim n As Integer
Dim strTxt() As String
Private Sub Command1_Click() '删除按钮
Dim strTemp As String
For i = 0 To UBound(strTxt)
If i <> j Then
strTemp = strTemp & strTxt(i) & vbCrLf
End If
Next
Text1.Text = strTemp
strTxt = Split(Text1, vbCrLf)
End Sub