G
Guest
I have the followingA2:A10) is defined as MyRange
Private Sub Worksheet_BeforeRightClick(ByVal Target As Excel.Range, Cancel
As _ Boolean)
If Application.Intersect(Target, Range("MyRange")) Is Nothing Then
Exit Sub
CommandBars("InputNameB").ShowPopup
Cancel = True 'prevents normal Right-Click menu from appearing
End Sub
This works properly as is. I have two CommandBars; InputNameA & InputNameB.
I would like to show InputNameA when cell A1 is right-mouse clicked and
InputNameB when any other cell in "MyRange" is right-mouse clicked. I would
like to accomplish this without removing A1 from "MyRange". Suggestions?
Private Sub Worksheet_BeforeRightClick(ByVal Target As Excel.Range, Cancel
As _ Boolean)
If Application.Intersect(Target, Range("MyRange")) Is Nothing Then
Exit Sub
CommandBars("InputNameB").ShowPopup
Cancel = True 'prevents normal Right-Click menu from appearing
End Sub
This works properly as is. I have two CommandBars; InputNameA & InputNameB.
I would like to show InputNameA when cell A1 is right-mouse clicked and
InputNameB when any other cell in "MyRange" is right-mouse clicked. I would
like to accomplish this without removing A1 from "MyRange". Suggestions?