Then kjv1611, could you please assist me in the following. Please highlight the differences between the three functions (mstrmage1768 (the faq I linked to), ssatech and mgolla), because I fail to see any difference at all - to my grumpy old eyes, they are identical. Only difference I can see, is mgolla invoking the function from VBA, whilst the other uses macros. You are saying you are familiar with mgollas code, didn't you see any similarities?
Due to agreed upon naming conventions, relative likeness in coding style etc, I'd expect similarities between different approaches to the same task, using the same API's etc, but look at the name of the function, variable names, order of the tests, empty lines at the same places, linebreak in the second api declaration, but not in the first nor in the function declaration...
Between mstrmage1768's faq and ssatech reply in this thread, even the number of single quotes in the End Code comment is equal, as is the suggested name of macro to invoke the function.
I don't think this is coincidental, I think someone has done a copy/paste without acknowledging other's work. I do not know who, neither do I want to suggest who, but I strongly urge those who post code as if it was their own, to acknowledge the work of others. When no acknowledgment is present, to me that means the poster claims that they've produced the code themselves. My personal distaste for such, is of course the reason for my reply, but I have a rather strong feeling it is not exactly encouraged neither by those who've done the original work, nor the Tek-Tips management.
Roy-Vidar