Hi
Is there a way to force a combobox to diplay it's list, like when a user clicks on the arrow, but do it using code?
Thanks!
dobs
Printable View
Hi
Is there a way to force a combobox to diplay it's list, like when a user clicks on the arrow, but do it using code?
Thanks!
dobs
Sure. Try this:
Code: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_SHOWDROPDOWN = &H14F
Private Sub Command1_Click()
Static bShow As Boolean
bShow = Not bShow
Call SendMessage(Combo1.hwnd, CB_SHOWDROPDOWN, bShow, 0)
End Sub
Private Sub Form_Load()
Dim i As Integer
For i = 1 To 10
Combo1.AddItem i
Next
End Sub