In the spirit of timtowtdi, why not add to the end of your sub a tiny routine that saves the name of the highest numbered file in a text file in the same directory? And a tiny routine at the beginning that opens this text file and reads the contents? I mean, why search for something you hid yourself? Sorry if there's something I didn't pick up on that makes this an impractical suggestion.