combo box question

  • Thread starter Thread starter mike
  • Start date Start date
M

mike

Hi all,

Is there a way to know if the user click on any of the
column in the dropdown in the combobox? Like when the user
type something in the combox and exit the combo box
without even selecting any thing from the combo box. I
just want to know if that could be done.


Thanks for the help.

mike
 
mike said:
Is there a way to know if the user click on any of the
column in the dropdown in the combobox? Like when the user
type something in the combox and exit the combo box
without even selecting any thing from the combo box. I
just want to know if that could be done.


You can use the MouseUp event to get the coordinates of the
mouse. Using those, it's possible to determine the column.
But WHY? The combo box tells you the row (ListIndex) and
you can retrieve the value from any column using the Column
property.

I have no idea how you would want to relate using the
keyboard to using the mouse.
 
Thanks for helping. now I need to know how that is done. I
need to know if the user select any value from the
dropdown in the combo box and perform different actions
base on if the user selected something or not.
-----Original Message-----
Yes.

You can use code or a macro to determine of a value in
the ComboBox was selected and then perform further actions
(or not), depending on the selection/lack of.
 
Just check the value of the combo box. If nothing is picked and assuming
you don't have a defauly value, the value will be null. If something was
picked then it will contain the value of the bound column.

If cmbPickHere=Null Then
strMsg = "Nothing was picked"
Else
strMsg = "The number " & cmbPickHere &" was picked"
End If
MsgBox(strMsg)

Kelvin
 
How can what be done?? Please discribe what you're trying
to accomplish in more detail (without getting into how you
think it might be done).
 
Back
Top