random number generator
Posted on 2005-04-11
I need to have a vb function that I can call which will return a 7 digit hash or random and unique number, based on a string it is passed. This number must be unique and could be calculated using the string itself or any other method, such as the date and time for example. If necessary the string can be limited to a fixed number or characters, within reason (perhaps 40 or 50 characters). I have already written a routine which simply returns the current time and first digit of the day (DHHMMSS) however this same number could be assigned to another element in the future. Checking to see if a number is already in use is possible, but I would prefer to avoid it since these numbers are being outputted to a flat file.
Thanks in advance for any suggestions or code.