Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Oct 2002
    Posts
    114
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Using .find() without wrap around? (2000/sp3)

    I want to search completely though a document to find all occurances of "X". But I only want to search the document once.

    Currently, .find() wraps around again and again. My best newbie solutoin is to set a "temp" range object to the results of the first find occurance (if not rngTemp is nothing then...), and basically loop until that same result (range) is found again.

    Is this the best way? Hopefully that's enough information (I can provide more if it is unclear)

    thanks,
    ..dane

  2. #2
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Using .find() without wrap around? (2000/sp3)

    Yes, that is exactly the way to go about that.
    I have written some sample code (long time ago) here
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

  3. #3
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Using .find() without wrap around? (2000/sp3)

    I think that is best way. Look under FIND in VB Help for example code on how this can be done.

    Steve

Posting Permissions

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