find / findnext question

  • Thread starter Thread starter Gary Keramidas
  • Start date Start date
G

Gary Keramidas

i wrote some code to do a find and find next. i then wanted to use what i found
to find something else within the find / findnext loop. i get an error on the
loop line.

so, i'm guessing i can't use another find within a find / findnext, correct?
 
You are correct... Effectively you need to do a find repeatedly in your outer
loop as find next will use the parameters of the last find that was executed.

The other option would be to execute your entire find/findnext loop to
create a single large range object based on everything found. You can then
traverse through that range object and perform your find from there... If you
need a demo or some code just reply...
 
i wrote some code to do a find and find next. i then wanted to use what i found
to find something else within the find / findnext loop. i get an error on the
loop line.

so, i'm guessing i can't use another find within a find / findnext, correct?

Can you post your code so we can see and maybe fix your problem?

Regards,
Matt Richardson
http://teachr.blogspot.com
 
thanks for confirming, jim.
--


Gary


Jim Thomlinson said:
You are correct... Effectively you need to do a find repeatedly in your outer
loop as find next will use the parameters of the last find that was executed.

The other option would be to execute your entire find/findnext loop to
create a single large range object based on everything found. You can then
traverse through that range object and perform your find from there... If you
need a demo or some code just reply...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top