Is implementing an OnAction() handler on a right-click action even possible?

Go To StackoverFlow.com

0

Is implementing an OnAction() handler on a right-click action even possible? This is for a DropDown object created programmatically.

2012-04-04 08:22
by stanigator


1

You can look at WindowBeforeRightClick

Public WithEvents appWord as Word.Application 

Private Sub appWord_WindowBeforeRightClick _ 
 (ByVal Sel As Selection, Cancel As Boolean) 
 Dim intResponse As Integer 

 intResponse = MsgBox("Selection = " & Sel & vbLf & vbLf _ 
 & "Continue with operation on this selection?", _ 
 vbYesNo) 
 If intResponse = vbNo Then Cancel = True 
End Sub

Or customizing the right-click menu

I have not tried either.

2012-04-04 09:57
by Fionnuala
Thanks. I don't think I want to try either. I'm actually asking on behalf of a friend actually - stanigator 2012-04-05 09:16
Ads