I have a piece of code to find an index into a text array, looking for a line that contains a string match.
I've learned that Application.Match is fairly useful as long as I know how it behaves. The returned number is always (+1) in the text array, so I have to adjust when that matters. Also, A.M will default to an exact match, but will use wildcards.
What threw me for a serious loop, is that Application.Match does not play well with very large arrays. I believe it is a memory limitation (but I forget).
Here is the code I use:
Today, running this would give me an application mismatch, when I know it works (DIMs are variant where needed, etc.)
So, here is how I got past that:
My question is... Should I just use my ugly for-next loop in place of Application.Match, or should I use Application.Match and trap errors (or test the UBound valuse is >= to some specific number)?
Being lazy, I'm inclined to just use what works.
I just noticed that I have to use the InStr() function for partial matches.
Bookmarks