Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Decimal Places for NOW() in VBA versus formula

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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formula to identify decimal versus whole numbers moily Excel Discussion (Misc queries) 18 February 28th 18 06:26 PM
changing decimal places according to formula result Valeria Excel Discussion (Misc queries) 6 September 11th 09 05:29 PM
Formula for: Format Decimal places? nastech Excel Discussion (Misc queries) 16 November 4th 05 02:25 PM
FIXED 2 DECIMAL PLACES, MUST ENTER ALL ZEROES AFTER DECIMAL POINT. SUKYKITTY Excel Discussion (Misc queries) 3 July 6th 05 01:50 PM
decimal places within a formula Paul01 Excel Discussion (Misc queries) 4 June 3rd 05 07:53 PM


All times are GMT +1. The time now is 03:29 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"