Thanks, lecxe. If that is the case though, what is wrong with my original bit of code? It still fails.
This may no longer be relevant at this point, but since you asked:
I had not yet read your code but now that I did I see that you are wrong: your original code works.
It does not, however, work as you intended, you have an error in the design.
When you specify a parameter as "saLookupArray() As String" you are saying that you are going to pass an array of strings. This means that if you pass anything else you'll get a type mismatch error.
Do the test to see that it works as you wrote it. I didn't change anything in the body of the function and restored the "saLookupArray() As String" as parameter:
This is your original code with the parameter "saLookupArray() As String" as you intended. Notice that I didn't change the code:
So, in conclusion, your original code works but the "saLookupArray() As String" is wrongly specified, not because it's a syntax error but bacause you want to pass parameters other than arrays of strings.
Hope this helps
lecxe
Bookmarks