Thanks for the info guys...that might help a little but doesn't entirely solve my problem. <BR>I have a loop on an array called arrDir...the array contains directories which are passed to a function which will search the directory for certain files. All folders and subfolders are searched and information is taken out of certain files to populate another array. So, after searching the first directory from the arrDir array, the function will be able to pass the array to the main program via the tips you guys gave me. But, the same process will occur when it gets the next directory. Will this overwrite the array created from the info in the first directory or is there a way to add the info from the first and second directories into the same array? Make sense?!
Declare a variable at the top of the page (outside of all functions) called aryDirs<BR><BR>In the function have a ByRef argument called directoryAry that Redim (preserving the contents) the array to be larger and then add to the array. Because it is passed by reference, any changes made in the function will affect the page's aryDirs array.<BR><BR>-Doug
Hey...thank you for the info. I'm working on it right now. The ByRef works good but I'm not sure if the ReDim Preserve is working for me. In order to get all info from all subfolders within a directory I must use recursion. So, I have to call the function from within the function. I'm not exactly sure what the problem is but my ReDim preserve statement isn't working. The problem might be coming from the fact that I'm passing the original array into the function using ByRef...when recursion occurs, I'm passing the passed array. Know what I mean? It's hard to explain. <BR>Any hints? This can be very frustrating sometimes!!