#1   Report Post  
Posted to microsoft.public.excel.misc
flow23
 
Posts: n/a
Default date

I have a macro that basically put current date in a cell

Dim d As Date
Dim s As String
Sheets("New Ren Data").Select
Range("a65001").Select

d = Now()
s = d
Selection.FormulaR1C1 = s

However the problem is that when I look at the value in the formula bar

its shows say for eg. today is 02/08/2006 09:43:2
It should show. 08/02/2006 instead.


any suggestions why ITs doing wrong?

  #2   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default date

Try this instead

Dim s As String
Sheets("New Ren Data").Select
Range("A65001").FormulaR1C1 = Date


--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"flow23" wrote in message
...
I have a macro that basically put current date in a cell

Dim d As Date
Dim s As String
Sheets("New Ren Data").Select
Range("a65001").Select

d = Now()
s = d
Selection.FormulaR1C1 = s

However the problem is that when I look at the value in the formula bar

its shows say for eg. today is 02/08/2006 09:43:2
It should show. 08/02/2006 instead.


any suggestions why ITs doing wrong?



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
Insert Automatic, Non-Updating Date Stamp Ken Zenachon Excel Discussion (Misc queries) 8 January 18th 06 06:52 PM
Need to Improve Code Copying/Pasting Between Workbooks David Excel Discussion (Misc queries) 1 January 6th 06 03:56 AM
Adding XY days to date in cells satucha Excel Discussion (Misc queries) 1 November 25th 05 08:02 AM
Another Date issue. TimM Excel Worksheet Functions 1 November 17th 05 01:58 AM
Date Math Problem Dkline Excel Worksheet Functions 4 March 4th 05 04:11 PM


All times are GMT +1. The time now is 10:24 PM.

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

About Us

"It's about Microsoft Excel"