This enters the date & time into cell A1 of Sheet1,
Hope this is what your after.
Sub DateMacro()
Dim myNow As String
myNow = Format(Now(), "YYMMDDhhmmss")
With Sheets("Sheet1").Range("A1")
.NumberFormat = "@"
.Value = myNow
End With
End Sub
Pet
--
Peter8
-----------------------------------------------------------------------
Peter81's Profile:
http://www.excelforum.com/member.php...fo&userid=2535
View this thread:
http://www.excelforum.com/showthread.php?threadid=53260