Button to set current time

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

Guest

I need a button in a excel spreadsheet that when pressed inserts the current
time in a cell. Any ideas ?
 
Hi

Control + : (that's Control + Colon) inserts current time to a cell.
Control + ; ( + semicolon) insets current Date
 
Why not just use the built in shortcut:
ctrl-:
(ctrl-colon aka ctrl-shift-semicolon)
 
If you really want a button............

Assign this macro to a button.

Sub NOWTIME()
ActiveCell.Value = Format(Now(), "h:mm:ss AM/PM")
End Sub


Gord Dibben MS Excel MVP
 
Back
Top