View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
stefan h via OfficeKB.com stefan h via OfficeKB.com is offline
external usenet poster
 
Posts: 3
Default Entering current date and time

How about?

Sub DateTime()
Selection.Value = Now
End Sub

Will enter the current date/time and does not change.
Stefan

PrologPro wrote:
I'm trying to come up with the quickest way to enter the current date and
time in my spreadsheet.

So far here's what I've tried:

Macro which recorded CTRL + ; (space) CRTL + SHIFT + ;
Unfortunately if you look at how the macro recorded this static date, it
actually has today's date listed in VB, not the actual function. I just want
VB to perform the FUNCTION.

I also tried the NOW() function, but I will have multiple rows keep track of
patches I've applied, and the date and time will change with each row entry.
The NOW formula updates all rows with the same date and time.

Any suggestions would be greatly appreciated.
Thanks!



--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200509/1