Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Private Sub treeView_MouseDown(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Long, ByVal Y As Long)
On Error GoTo Err_treeView_MouseDown
Dim nodOverNode As Node
Set nodOverNode = Me.treeView.HitTest(X, Y)
If Not nodOverNode Is Nothing Then
Me.treeView.Nodes(nodOverNode.index).Selected = True
Call treeView_NodeClick(nodOverNode)
End If
If Button = acRightButton Then ' Popup shortcut menu, but which one?
If nodOverNode Is Nothing Then ' This one is not context sensitive, it is the form default.
Application.CommandBars(Me.ShortcutMenuBar).ShowPopup
Else ' This one is context sensitive (I.e. could be different depending on node clicked)
Application.CommandBars("MyShortcutMenuBar").ShowPopup ' where MyShortcutMenuBar is your custom menubar name
End If
End If
Exit_treeView_MouseDown:
Exit Sub
Err_treeView_MouseDown:
MsgBox Err.Description
Resume Exit_treeView_MouseDown
End Sub