I've gone through this website
http://www.mcgimpsey.com/excel/timestamp.html.
I dont know how to use the code given:
Public Sub DateTimeStamp(ByVal ChangedCells As Range, _
Optional ByVal IncludeDate As Boolean = True, _
Optional ByVal IncludeTime As Boolean = True, _
Optional ByVal DTFormat As String = "dd mmm yyyy hh:mm", _
Optional ByVal RowOffset As Long = 0&, _
Optional ByVal ColOffset As Long = 1&, _
Optional ByVal ClearWhenEmpty As Boolean = True)
Const n1904 As Long = 1462
Dim bClear As Boolean
Dim rArea As Range
Dim rCell As Range
Application.EnableEvents = False
For Each rArea In ChangedCells.Areas
For Each rCell In rArea
With rCell
bClear = ClearWhenEmpty And IsEmpty(.Value)
With .Offset(RowOffset, ColOffset)
If bClear Then
.ClearContents
Else
.NumberFormat = DTFormat
.Value = Date * -IncludeDate - _
Time * IncludeTime + _
n1904 * .Parent.Parent.Date1904
End If
End With
End With
Next rCell
Next rArea
Application.EnableEvents = True
End Sub
paul said:
a simple macro will do this automatically upon a click of a button
otherwise
you are stuck with ctrl; ctrlshift;
--
paul
remove nospam for email addy!
Ken Vo said:
Thanks Paul,
What I really want is a formula in a command button to save the dates
and
time that i have inspected a road. Whenever i open the same spread
sheets,
the dates and time have changed. Can u help?
:
copy and paste special =now() as a value or delete =Now() and
Insert a static date or time
Current date Select a cell and press CTRL+;
Current time Select a cell and press CTRL+SHIFT+;
Current date and time Select a cell and press CTRL+; then SPACE
then
CTRL+SHIFT+;
--
paul
remove nospam for email addy!
:
Hi,
I wonder if anyone can help me. I need to know how to create a
command
button, when clicked it saves the spreadsheet along with the dates
and time
on my desktop.
However, if that can't be done...is there a formula that lets u
saves the
spreadsheet along with the dates and time. Whenever I open the same
spread
sheet, the dates gets changed and my previous information of the
dates are
lost - I use [= NOW()]. How can i stop this?