Re: Enter current time into cell hh:mm:ss

Tech-Archive recommends: Fix windows errors by optimizing your registry




Good evening rglasunow

You would be better off using the =NOW() function, the only problem
with this is that it will alter every time the *** is recalculated.
The code below will call the NOW() function, format the cell
appropriately and then changes the cell contents from a formula to a
value.

Sub TimeStamp()
ActiveCell.FormulaR1C1 = "=NOW()"
With Selection
NumberFormat = "h:mm:ss;@"
Formula = .Value
End With
End Sub

HTH

DominicB


--
dominicb
------------------------------------------------------------------------
dominicb's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=18932
View this thread: http://www.excelforum.com/showthread.php?threadid=382135

.


Quantcast