I am using an ActiveX combo box on a worksheet. I am trying to select an item with a mouse. I have found the code below and it does work. However, unless you place the mouse pointer on the very bottom of the item highlighted in blue, it will select the item above it. Is there another way to do this? or is there a way to adjust the code to make this function better?
Private Sub TempCombo_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal x As Single, ByVal y As Single)
If TempCombo.TopIndex > -1 Then
Dim curIndex As Integer
curIndex = TempCombo.TopIndex + Application.WorksheetFunction.RoundDown(y / 13.5, 0)
CurValue = TempCombo.list(curIndex)