In a Module:
Public Declare Function GetKeyState Lib "user32" (ByVal nVirtKey As Long) As
Integer
In the Worksheet:
Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As
Boolean)
MsgBox "BeforeRightClick"
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not CBool(GetKeyState(vbKeyRButton) And &H8000) Then _
MsgBox "SelectionChange"
End Sub
"mohsinb" wrote in message
...
Rob,
Just to clarify further, is there a way of knowing that the
selectionchange is being fired by a right-click ?. if i could trap that
then I could arrange my logic.
---
Message posted from http://www.ExcelForum.com/