Results 1 to 3 of 3

Difference between Intersect and Not Intersect is Nothing

Threaded View

  1. #1
    Registered User
    Join Date
    12-05-2006
    Location
    Philadelphia PA
    MS-Off Ver
    Office 365
    Posts
    81

    Difference between Intersect and Not Intersect is Nothing

    My app uses Worksheet_Change(ByVal, Target as Excel.Range)

    To narrow the scope of the event I then use either:

    If Not Intersect(Target, Trading) Is Nothing Then
    
    If Intersect(Target, Trading) Then
    The large majority of code samples that I've seen for the Change Event all use the first form. Yet intuitively I would expect the 2nd form to be operationally identical since NOT and IS NOTHING appear to cancel each other. And because it eliminates NOT and IS NOTHING, the 2nd form ought to be more efficient. In fact, in my application the 2nd form seems to do the same thing and work just as well. Is there some gotcha or subtle distinction between the two forms that I should be aware of?
    Last edited by batman; 11-13-2009 at 05:40 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1