tweedle
Well-known Member
- Joined
- Aug 1, 2010
- Messages
- 1,559
Sooo, I have my pop-up menu popping on BeforeRightClick, and I have suppressed the 'normal' context popup; How can I test to know that the user has selected a single entire row? That's really the only time I want the custom menu to display. The menu items are rather dedicated to replicating/producing entire rows within a project management template.
Below are my failed attempts....
Below are my failed attempts....
Code:
Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As Boolean)
' If ActiveSheet.Selection.EntireRow Then 'nope
' If TypeName(Selection) = "Range" Then 'no
' If Selection.Rows.Count > 0 Then 'not working
If Selection.EntireRow.Count > 0 Then 'not working
ShowMyMenu 'Shows my menu
Cancel = True 'Suppresses the 'normal' context menu
End If
End Sub