View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
quartz[_2_] quartz[_2_] is offline
external usenet poster
 
Posts: 441
Default Generate a unique form number

Oh yeah... :-(

Thanks for your response.

"Henry" wrote:

quartz,

This will not give a unique number.
If the same user goes in the next day, but 1 second earlier, your formula
would give the same result.
Same user number, date increased by 1, time reduced by 1.

Henry

"quartz" wrote in message
...
I am using Office 2003 on Windows XP.

I have a form built in Excel that will be placed in an Outlook folder
making
it accessible to all users within our organization.

Each time a user opens this form a unique number must be generated on the
form.

Suppose I convert the Excel date to a value: e.g. Aug 17, 2005 becomes
38363
and for time I use 5:34:15 pm = 173415. Now suppose I add these two
numbers
together and also add the user's computer ID to this (each user must have
a
unique computer ID) for example: 83177.

This would then be 38363 + 173415 + 83177 = 294955

Question: Since this value is date and time based and combines a unique
computer ID, would this ALWAYS generate a unique six digit form number?

The form number does need to be unique, but not necessarily in sequence
Any
one have any other suggestions?