close

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

Dim d As Date
Dim s As String
Sheets(quot;New Ren Dataquot;).Select
Range(quot;a65001quot;).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?Try this instead

Dim s As String
Sheets(quot;New Ren Dataquot;).Select
Range(quot;A65001quot;).FormulaR1C1 = Date--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

quot;flow23quot; gt; wrote in message
...
gt; I have a macro that basically put current date in a cell
gt;
gt; Dim d As Date
gt; Dim s As String
gt; Sheets(quot;New Ren Dataquot;).Select
gt; Range(quot;a65001quot;).Select
gt;
gt; d = Now()
gt; s = d
gt; Selection.FormulaR1C1 = s
gt;
gt; However the problem is that when I look at the value in the formula bar
gt;
gt; its shows say for eg. today is 02/08/2006 09:43:2
gt; It should show. 08/02/2006 instead.
gt;
gt;
gt; any suggestions why ITs doing wrong?
gt;

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()