Hi
Works almost, however another issue has arisen by coincidence. I am searching a closed wb's fieldnames using ADODB and just want to pull required fieldnames. What happened in testing is I came across sFruit = "Red plums. " i.e. with a dot.
When the db is searched the fieldname in the db is interpreted as "Red plums# ". It is the # which is the issue now.
Therefore when substituting real strings the code becomes...
Instr("Apples, Red plums. , Pears", "Red plums# ") and that cannot match.
I have tried wildcards without effect.
For what it is worth the code looks like this...
The search criteria is built from one opened wb by selecting anything up to 11 fieldnames using a form. Once done a number of selected but unopened wbs are searched for similar fields.
It is better to do the search within the closed wb rather than import all the fields to the xla then search because of the varied construction of the closed wbs.
Bookmarks