Macro help?

  • Thread starter Thread starter Ken
  • Start date Start date
K

Ken

Hi all,

I am looking for some code that will allow me to enter the
current time into a cell by using a shortcut key...(Ctrl+T
for example). Or possibly by using a button. I've never
used a button before but I'm sure I can figure it out. Any
insight? Thanks in advance.
 
hi - the following code will put the time in the active cell

Sub TimeMacro()
ActiveCell.Value = Now
End Sub

Type the macro into a module and then in the spreadsheet display the Forms
Toolbar - create a Command Button on the sheet and assign this macro to it
 
Ken

Do you need a macro?

CRTL + SHIFT + ;(semi-colon) will enter the current time.

CRTL + ; will enter current date.

Gord Dibben Excel MVP - XL97 SR2 & XL2002
 
Back
Top