Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Treeview with context menus
Trying to make a form with a TreeView control and context menus. So rather than having buttons for the typical Add, Edit and Remove commands, I'd like to do everything in context menus. Problem #1 is I can't find context menu controls (or any menus!) among Additional Controls in VBA. Problem #2 is that I can't find out how to catch a right mouse click in the TreeView.
Shall I resort to using the TreeView for selecting nodes only and use buttons for the Add, Edit and Remove commands? Gustaf |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Treeview with context menus
you can use the mousedown event to check which button was pressed ...
Private Sub TreeView1_MouseDown(ByVal Button As Integer, ByVal Shift As Integer, ByVal x As stdole.OLE_XPOS_PIXELS, ByVal y As stdole.OLE_YPOS_PIXELS) MsgBox "button " & Button End Sub "Gustaf" wrote in message ... Trying to make a form with a TreeView control and context menus. So rather than having buttons for the typical Add, Edit and Remove commands, I'd like to do everything in context menus. Problem #1 is I can't find context menu controls (or any menus!) among Additional Controls in VBA. Problem #2 is that I can't find out how to catch a right mouse click in the TreeView. Shall I resort to using the TreeView for selecting nodes only and use buttons for the Add, Edit and Remove commands? Gustaf |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Sub-menus of main menus for Excel 2007 | New Users to Excel | |||
adding to Context Menus in Excel 2007 | Excel Programming | |||
Accessing the excel 2007 context menus... | Excel Programming | |||
[Excel '03] check-box menu items and cell context menus don't disp | Excel Programming | |||
Overriding Actions of Excel DropDown Menus and Poup Menus | Excel Programming |