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
 

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

Back
Top