repost... Listbox

  • Thread starter Thread starter Jim C.
  • Start date Start date
J

Jim C.

I've added code to a listbox's mousedown event to trigger
a rightclick shourtcut menu. I Most windows applications,
when you right click the menu appears AND the item is
selected. I have been unable to duplicate this. here is a
copy of the code i'm working with...
***********************************************************

Private Sub lbTakeoff_Mouseup(ByVal Button As Integer,
ByVal Shift As Integer, ByVal X As Single, ByVal Y As
Single)

If Button = 2 Then
CommandBars("rclick").ShowPopup
End If

End Sub

***********************************************************
thanks...
 
code works great... i had to change Clng to ((y-10)/10) to
account for the header...

only one problem, my procedures require listindex to be
selected. right now they appear to only be activated
(just a rectangle) no blue highlight...

what you gave me though really helps alot... thankyou
 
should have told you listbox is multiselect... when
changed to single, your code works perfect
 
Back
Top