Marcster
12-02-2005, 06:30 AM
I have the following code which needs amending:
Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As Boolean)
If Target.Column <> 1 Then Exit Sub 'Column A
If Target.Row = 1 Then Exit Sub 'Row 1
CommandBars("Custom_RightClickMenu").ShowPopup
Cancel = True 'Do not show the default rightClick menu
End Sub
The above code will show the 'Custom_RightClickMenu' when user
right clicks on any cell in Column A apart from cell A1.
Is there a way to use 'names' instead of
Target.Row and Target.Column?. :dunno
Thanks,
Marcster.
Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As Boolean)
If Target.Column <> 1 Then Exit Sub 'Column A
If Target.Row = 1 Then Exit Sub 'Row 1
CommandBars("Custom_RightClickMenu").ShowPopup
Cancel = True 'Do not show the default rightClick menu
End Sub
The above code will show the 'Custom_RightClickMenu' when user
right clicks on any cell in Column A apart from cell A1.
Is there a way to use 'names' instead of
Target.Row and Target.Column?. :dunno
Thanks,
Marcster.