View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Tushar Mehta Tushar Mehta is offline
external usenet poster
 
Posts: 1,071
Default Exception when uisng Intersect method

I guess it wasn't obvious from my post that I was using the default
workbooks created by XL. Which meant different workbooks with
worksheets named the same. A safer name test would be
Rng1.Parent.Parent.Name < Rng2.Parent.Parent.Name Or Rng1.Parent.Name
< Rng2.Parent.Name

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

In article ,
says...
Is didn't work well in all cases in xl97. I don't question your approach,
but I don't see how it is safer than checking the name of the sheets by
comparing the results of the name property. Maybe more pleasing, maybe
even faster, but I don't see a case where using the name would fail and the
IS approach would be successful.