>I got it, thanks Hilmar. I turned off the 30,000 byte limit and boy that was a mistake! Sometimes too much information is as bad as not enough! :o)
Since the function might be used against files of varying size, 100,000 bytes (for instance) might be too little for some files, too much for others.
How about a third parameter, for the maximum number of bytes. Make it default at 100,000, or some other reasonably medium-sized number.
Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)