Test if ActiveCell is within a certain named range
Hi Steven,
Try:
'=============
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Range("RangePriority"), Target) Is Nothing Then
MsgBox Target.Address(0, 0) _
& " intersects with the RangePriority range"
End If
End Sub
'<<=============
---
Regards,
Norman
"Steven" wrote in message
...
I have a range named "RangePriority". When I click in a cell in the
worksheet how can I test to see if it is within the range "RangePriority".
I guess it the testing would occur in:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Code Here to Test ActiveCell
End Sub
Thank you for your help.
Steven
|