Consulting

Results 1 to 2 of 2

Thread: .Find() Arbitrary Search Direction

  1. #1
    VBAX Tutor MINCUS1308's Avatar
    Joined
    Jun 2014
    Location
    UNDER MY DESK
    Posts
    254

    .Find() Arbitrary Search Direction

    If I, or coworker #1, run my code the .find search direction is top to bottom. (on windows 10)
    If coworker #2 runs the code I believe the search direction is bottom to top. (on windows 7)

    I didn't explicitly say which direction to search the range and I know I could have -
    but why is it just coworker #2's machine that seems to want to search bottom to top?

    Set S4PRODIDAddress = Sheet4.Range("Table_Tablix1").Find(MyBatchNumber, LookIn:=xlValues, LOOKAT:=xlWhole, SEARCHORDER:=xlByRows, MatchCase:=True)
    Would the quick fix be to just explicitly tell it to search top down?
    - I HAVE NO IDEA WHAT I'M DOING

  2. #2
    VBAX Master Aflatoon's Avatar
    Joined
    Sep 2009
    Location
    UK
    Posts
    1,720
    Location
    Yes, it would. Find remembers any settings that were made in previous Find operations, including manual ones, so I would suspect that coworker #2 has run a find going upwards.
    Be as you wish to seem

Posting Permissions

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