+ Reply to Thread
Results 1 to 3 of 3

Intersection - Multiple ranges SUDDENLY not supported

  1. #1
    Registered User
    Join Date
    04-22-2011
    Location
    Holland
    MS-Off Ver
    Excel 2002
    Posts
    3

    Exclamation Intersection - Multiple ranges SUDDENLY not supported

    Hello all,

    As a starting user of VBA in Excel I have frequently used this forum for solutions to my vba problems (many thanks for that!). This time I couldn't find an answer to my problem, so I decided to register and ask for myself.

    I wrote a sub that is fired by the Worksheet_SelectionChange event. I put it in the code page for the Worksheet ("FR") itself. Cut to the bone it looks like this:


    Please Login or Register  to view this content.
    This worked perfect, until yesterday. Now I get the error 1004 - method range of object_worksheet has failed (translation of the error is mine, since I have a Dutch Office version).

    I changed the code to:

    Please Login or Register  to view this content.

    It still results in an error: 1004 - by application or object defined error

    Then I found out that the resulting problem is in the fact that I defined multiple ranges.

    So when the code is changed to the following, it works:

    Please Login or Register  to view this content.
    So it works for a single range but I need to refer to multiple ranges (even more than in the above mentioned example. I already tried to use the names I specified for the ranges in stead of eg C9:R40, but the error remains.

    The question is:

    - How come I get these 2 errors now and not before yesterday?

    - What can I do about it?

    Help is much appreciated!

    Kind regards,

    Geronimo
    Last edited by Geronim0; 04-22-2011 at 08:17 AM. Reason: Problem solved

  2. #2
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Intersection - Multiple ranges SUDDENLY not supported

    Hmmm?

    Seems okay in 2003 & 2007, should be okay in 2002, can't check that version.

    Change the selection within the grid and the checkboxes toggle (just an example in a sheet I had open)

    What exactly have you done since yesterday?
    Attached Files Attached Files
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  3. #3
    Registered User
    Join Date
    04-22-2011
    Location
    Holland
    MS-Off Ver
    Excel 2002
    Posts
    3

    Re: Intersection - Multiple ranges SUDDENLY not supported

    Quote Originally Posted by Marcol View Post
    Hmmm?

    Seems okay in 2003 & 2007, should be okay in 2002, can't check that version.

    Change the selection within the grid and the checkboxes toggle (just an example in a sheet I had open)

    What exactly have you done since yesterday?
    I discovered what went wrong! There were two versions of this excel file open, both with the same worksheet names, range names etc. Closing the other version was the solution.

    Thanks for you time and effort, problem solved!

+ Reply to Thread

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