Decimal Places for NOW() in VBA versus formula

  • Thread starter Pete at Sappi Fine Paper
  • Start date
P

Pete at Sappi Fine Paper

Okay, so I enter into cell A1 the formula =NOW(), and set the format to:

m/d/yyyy h:mm:ss.000

.... thus giving me fractions of a second to three decimal places. And those
decimal places display just fine - for example the cell currently reads:

8/21/2006 16:18:15.260

However, when I set the same cell using VBA:

Range("A" & 1) = Now()

I get this:

8/21/2006 16:18:15.000

For some reason it rounds to the nearest second. Any idea why, and how I
can fix it? Thanks!

Pete
 

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

Top