View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
jst_se jst_se is offline
external usenet poster
 
Posts: 5
Default change datestamp from yyyy-mm-dd to yymmdd

Thank you, Frank! That works just fine :)

Frank Kabel wrote:

Hi
try
Private Sub Workbook_Open()
with Sheets("dayreport").Range("T5")
If .value = "" Then
.value = Date
.numberformat="YYMMDD"
End If
end with
End Sub


--
Regards
Frank Kabel
Frankfurt, Germany

"jst_se" schrieb im Newsbeitrag
...

I have an auto inserted datestamp when I open a workbook. The


dateformt

is yyyy-mm-dd (example: 2004-07-22), and I wonder if there are any


way

to convert it to yymmdd (example: 040722)?
Here's the VBA source I use to get the datestamp:

Private Sub Workbook_Open()
If Sheets("dayreport").Range("T5") = "" Then
Sheets("dayreport").Range("T5") = Date
Else
End If
End Sub

--
//Jst
Reclaim Your Inbox!
http://www.mozilla.org/products/thunderbird/





--
Reclaim Your Inbox!
http://www.mozilla.org/products/thunderbird/