Quote:
I'm (trying to) read(ing) all the subdirectories from \\OldMachine\C$\Documents and Settings.
In this directory I will find useraccount starting with 'nl' and computeraccounts starting with 'nlzz'.
You can NOT find BOTH the user AND computer name in that folder. Therefor, the second IF will always fail, $RunCount never increment, and a ReDim() to a negative number. If you single step in debug, that should be obvious.
Also, you say "\\OldMachine\C$\Documents and Settings" but the first code showed "C:" and the latest shows "O:"
You could use one of the NetView() UDFs to list out all the computer names. I am not sure how you determine what is an OLD vs NEW computer but am thinking maybe the OLD ones start with "NLZZ"since you seem to want to count how many of those there are. Not sure what the purpose is of counting them.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.