Get value of the highlighted item in a combobox dropdown list? Excel VBA -
the mouseover event of combobox on form triggers label become visible , show details of selected combobox value. when user clicks down arrow show combobox list items available selection, want label update details of highlighted item in dropdownlist without having select combobox value.
in other words, user moves mouse on items , highlighted item changes, want details in label update highlighted value.
so far, have found nothing on how this. excel knows item highlighted, how access information programmatically eludes me.
any ideas?
if combobox control use mousemove event current highlighted item.
private sub combobox1_mousemove(byval button integer, byval shift integer, byval x single, byval y single) if combobox1.topindex > -1 dim curindex integer curindex = combobox1.topindex + application.worksheetfunction.rounddown(y / 13.5, 0) curvalue = combobox1.list(curindex) end if end sub
then show tooltip.
note: 13.5 is, tests, height of item in dropdown...
Comments
Post a Comment