Insert Time Stamp when macro is run

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi All,

I'm generating reports using macros. I would like to Insert a time stamp
when the macro is run. Can you please let me know how?

I'm aware of =Now() to insert time stamp. But like to insert actual time
when the user runs the macro.

Thanks,
Nagesh
 
Hi JE McGimpsey,

Your solution works, but the date is inserted as 1/1/1900..I have instead
used =now() instead of Time

Thanks for getting me going
 
Hmm.. Doesn't here.

Another way:

Public Sub try()
With Range("A1")
.Value = Time
.NumberFormat = "00:00:00"
End With
'rest of macro
End Sub
 
Back
Top