what do you want exactly as result if subfolder is set ?
Do you want a list of just files that match extension
or do you want a list of files and dirs that match extension
or do you a list of files that match extension and all subdirs ?

I started to write a new version of your DirPlus function without global array and problem of recursion but i need more informations.

is it really interesting to get fso object in the dirplus function ?
why not write 2 functions :
- one that returns a list of name
- one that returns a list of fso object

_________________________
Christophe