Here is something to get you started.
VB Code:
Option Explicit
Public Declare Function SendMessageStr Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, _
ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As String) As Long
Private Const CB_FINDSTRINGEXACT = &H158
Private Const CB_FINDSTRING = &H14C
Public Function SearchCBO(ByRef cboCtl As ComboBox, ByVal sSearchCriteria As String, Optional ByVal bLIKE As Boolean) As Long
'<RR 08/08/2003 - VB/OUTLOOK GURU>
On Error GoTo No_Bugs
If bLIKE = False Then 'EXACT MATCH
SearchCBO = SendMessageStr(cboCtl.hwnd, CB_FINDSTRINGEXACT, 0&, ByVal sSearchCriteria)
Else 'LIKE MATCH
SearchCBO = SendMessageStr(cboCtl.hwnd, CB_FINDSTRING, 0&, ByVal sSearchCriteria)
End If
Exit Function
No_Bugs:
MsgBox Err.Number & " - " & Err.Description, vbOKOnly + vbInformation
End Function
Private Sub Command1_Click()
If SearchCBO(Combo1, Combo1.Text, False) > -1 Then
'Exists already
Else
'Not found in combo
End If
End Sub