View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Jan Karel Pieterse Jan Karel Pieterse is offline
external usenet poster
 
Posts: 535
Default Macro for data and time

Hi Rexmann,

Unfortunately it just enters the date at the time I recorded the macro. I
would like to record just the key strokes so it puts in the date and time at
the time the macro is run. Is this possible? I am not a great expert at
visual basic but can normally fudge a solution! Any suggestion to do this?


For the time, make sure the code within your macro is like this:

ActiveCell.Value = Time

and for the date:

ActiveCell.Value = Date

Regards,

Jan Karel Pieterse
Excel MVP
http://www.jkp-ads.com
Member of:
Professional Office Developer Association
www.proofficedev.com