Insert Time Stamp when macro is run

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
 
G

Guest

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
 
J

JE McGimpsey

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top