Thank you for your responses! I tried them out and here are the solutions I settled on to allow the user to type the code, auto expand and limit to list:
To allow for a Drop Down - this was provided by thread222-953023:
On Form:
Private Sub cboErrorCode_KeyDown(KeyCode As Integer, Shift As Integer)
DropDownCombo cboErrorCode
End Sub
In a Module:
Public Declare Function SendMessage Lib "user32.dll" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Integer, ByVal lParam As Any) As Long
Public Sub DropDownCombo(cbo As ComboBox)
Const CB_GETDROPPEDSTATE = &H157
Const CB_SHOWDROPDOWN = &H14F
If Not CBool(SendMessage(cbo.hwnd, CB_GETDROPPEDSTATE, ByVal 0, ByVal 0&)) Then
SendMessage cbo.hwnd, CB_SHOWDROPDOWN, True, ByVal 0&
End If
End Sub
To allow for Limit to List Validation - this was provided by VLADK (sorry - I don't remember the thread maybe he can add it?:
Private Sub cboErrorCode_Validate(Cancel As Boolean)
Dim i As Integer
Dim blnListItemMatch As Boolean
For i = 0 To cboErrorCode.ListCount - 1
If cboErrorCode.Text = cboErrorCode.List(i) Then
blnListItemMatch = True
Exit For
End If
Next i
Cancel = Not blnListItemMatch
End Sub