Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
listbox
is there a way to add a rightclick mouse event to a
listbox control? or a rightclick event to the whole userform? using windows api's maybe? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
listbox
ok, figured out how to add shortcut menu to mousedown
event... my next question is when mousedown event detects button 2 and executes code, how can i select the item the pointer is currently pointing at. for instance, rightclick a cell on a worksheet and the cell is selected and the shorcut menu is displayed. -----Original Message----- "jim c." wrote in message ... is there a way to add a rightclick mouse event to a listbox control? or a rightclick event to the whole userform? using windows api's maybe? Use the mousedown event Private Sub ListBox1_MouseDown(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single) If Button = 2 Then 'Right Mouse button is 2 ' Do your stuff End If End Sub Keith . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Listbox 2 takes the value of Listbox 1 | Excel Discussion (Misc queries) | |||
listbox B conditional of input in Listbox A | Excel Discussion (Misc queries) | |||
Listbox B if LIstbox A equals | Excel Discussion (Misc queries) | |||
Listbox | Excel Programming | |||
Sorting ListBox results or transposing ListBox values to other cells for sorting | Excel Programming |