Adding a control button to insert a date in the active cell.

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

Guest

Hello,
I'm trying to make a control button that will populate a static date (Ctrl
+) in the active cell that the person has chosen.
Any input is greatly appreciated.
 
Mike

Sub NOWDATE()
ActiveCell.Value = Format(Date, "dd-mmm-yy")
End Sub


Gord Dibben Excel MVP
 
Try This.

Sub Time_Stamp()
'
' Time_Stamp Macro
'

'
ActiveCell.Offset(0, -1).Range("A1").Select
ActiveCell.FormulaR1C1 = "=NOW()"
ActiveCell.Select
Selection.Copy
Selection.PasteSpecial Paste:=xlValues,
Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
Selection.NumberFormat = "h:mm"
ActiveCell.Columns
("A:A").EntireColumn.EntireColumn.AutoFit
End Sub
 

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