Formatting hundredth of a second (VBA)

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm currently using the following to timestamp certain events

fileNumber = Format(Now(), "YYYYMMDDHHSS"

This is not precise enough. Whats the format for hundredth of a second? I want to return a value such as "2004031213175248". Adding another SS always returns ".00" at the end

Many thanks in advance

Red.
 
Hi JE
just curious :-)
though this works with NOW as a worksheetfunction. e.g.
TEXT(NOW(),"YYYYMMDDHHMMSS.00")

within VBA the following seems to return always 00 for the miliseconds
ActiveCell.value = format(now(),"YYYYMMDDHHMMSS.00")
 
Yup - I didn't read the OP's usage right - it works for assigning a
cell numberformat, but not within VBA.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top