Need help building a macro that displays date/time in active cell
Here is a macro to do what you asked for...
Sub InsertDateTime()
ActiveCell.Value = Now
ActiveCell.NumberFormat = "mmm d, yyyy - h:mm:ss AM/PM"
End Sub
Note that unlike the worksheet function NOW(), the date/time entered into
the active cell by this code will be fixed at the date and time the code was
executed.
--
Rick (MVP - Excel)
"MSUser" wrote in message
...
|