Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dear All, I amusing the coding b 1

Status
Not open for further replies.

robcarr

Programmer
May 15, 2002
633
GB
dear All,

I amusing the coding below to update an ontime reporting file, and I need to format the date as below, but when dname gets entered into the cell, it foramts as MM/DD/YY HH:MM the cell formatting is dd/mm/yy hh:mm, and makes the ontime reporting incorrect, dname also shows as dd/mm/yy hh:mm, does nayone knwo why this is.

Workbooks.Open Filename:=pathname
mme = Format(Now(), "mmmm")
Sheets(mme).Select
Range("d10").End(xlDown).Offset(1, 0).Activate
dname = Format(Now(), "dd/mm/yy hh:mm")
ActiveCell.Value = dname


Thanks Thanks Rob.[yoda]
 
Hi Rob

I have messed around with this and found that if I use

Dim dname As Date

as the first line of the Subroutine it works for me

Hope this helps

Simmy
[surprise]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top