View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] notprovided@forobviousreasons.com is offline
external usenet poster
 
Posts: 3
Default Application.Intersect

Why doesn't this work?

Straight from the microsoft site, or the help files for
Application.Intersect

Worksheets("Sheet1").Activate
Set isect = Application.Intersect(Range("rg1"), Range("rg2"))
If isect Is Nothing Then
MsgBox "Ranges do not intersect"
Else
isect.Select
End If

I opened a new workbook, named two ranges which must intersect per the
procedure, and it displays the messagebox every time. Doesn't matter
if there's a value in the intersected cell or not.