View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson[_5_] Dave Peterson[_5_] is offline
external usenet poster
 
Posts: 1,758
Default Before RightClick event change

Maybe you could check to see if the selection is a whole row(s).

Option Explicit
Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As Boolean)
If Target.Address < Target.EntireRow.Address Then
Cancel = True
Exit Sub
End If

'do your stuff
MsgBox Target.Address

End Sub

broogle wrote:

Hi, I am trying to use "Before_RightClick" event change in my code,
but, I just want to make this event being triggered only if the user do
the rightclick on the row(s) (the left handside number of the
sprdsheet) not anywhere else in the workbook area.
How can I identify this?

Thanks


--

Dave Peterson