VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Combobox Autofill / Quicken style combobox

Mk553  (1 Submission)   Windows API Call/Explanation   Visual Basic 3.0   Intermediate   Wed 3rd February 2021

This class module automatically fills the text of a combo box, using an API call to look up the text from its list.

Inputs
Dim goAutoFill as New clsComboFill ' In the Change event of the combo box: Call go_AutoFill.GetListValue(cboBoxName) ' In the KeyUp event of the combo box: Call go_AutoFill.SupressKeyStroke(cboBox, KeyCode)

Assumes
Copy this code into a class module called 'clsComboFill.'

Returns
Only returns the contents of the combobox's list, or ignores the rest.

API Declarations
' In the class module:
Private Declare Function SendMessage Lib "USER32" Alias "SendMessageA" (ByVal hWnd As Long, _
ByVal wMsg As Long, _
ByVal wParam As Long, _
lParam As Any) As Long
Private Const CB_FINDSTRINGEXACT = &H158
Private Const CB_FINDSTRING = &H14C
Private Const CB_ERR = (-1)

Rate Combobox Autofill / Quicken style combobox (7(7 Vote))
Combobox Autofill / Quicken style combobox.bas

Combobox Autofill / Quicken style combobox Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters