Actually, i've just done a bit more testing and it's weirder than it first seemed.

I was searched for *.XLS using DirList()

I decided to rename the single XLS file I had in the folder DirList was searching to a .XLS2 file extension. Seems that DirList() still picks up an ".XLS2" file even if you're just searching for "*.XLS"

So the result 0 was actually correct (based on the strange functionality of DirList())

When I renamed the extension to .TXT and re-ran my code, in fact DirList() returns a UBOUND result of -1 which is great, just what I needed!

I guess it's not expecting a four character long file extension and just ignoring anything past the usual three characters which is why it still counted a ".XLS2" file as a ".XLS" file....!

Don't know if this info helps anyone.