You mean, set the dropdown width of the combobox?
Change the Public to Private if you want to use in the form declarations.
Code:Public Declare Function SendMessage Lib "user32" _ Alias "SendMessageA" (ByVal hwnd As Long, _ ByVal wMsg As Long, ByVal wParam As Long, _ lParam As Long) As Long Public Const CB_SETDROPPEDWIDTH = &H160 Public Sub SetComboWidth(oComboBox As ComboBox, _ lWidth As Long) ' lWidth is in pixels SendMessage oComboBox.hwnd, CB_SETDROPPEDWIDTH, lWidth, 0 End Sub




Reply With Quote