HOW TO: Intersect two ranges?

  • Thread starter Kevin McCartney
  • Start date
K

Kevin McCartney

Hi TWIMC,

I've the following code at the start of the 'Worksheet_SelectionChange'
private sub procedure but for some unknown reason to me it doesn't think my
selected range is within rows 1 to 10.

Basically, when I select a cell range, if some part of that selected range
crosses over row 10 then I don't want the procedure to run.

So if my Target range is $B$7 or $B$5:$B$10 I want it to Exit Sub


If Intersect(Target, Application.ActiveSheet.Rows("1:10")) Then Exit Sub


Can someone enlighten me as to where I am going wrong

TIA
KM
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Search for LIKE 4
Sum of the intersect of two named ranges 6
Need Help with a VBA subroutine 0
Empty cell warning 0
Empty cell warning 3
Macro 2
Intersecting dates 6
Modify range in VBA 9

Top