其中,让combo的下拉记忆不重复的代码如下:
Private Sub combo1_LostFocus()
Dim flag0 As Boolean, i
flag0 = False
For i = 0 To Combo1.ListCount - 1
If Combo1.List(i) = Combo1.Text Then
flag0 = True
Exit For
End If
Next
If Not flag0 Then
Combo1.AddItem Combo1.Text
End If
End Sub