Date Macro

G

Guest

How can I enter today’s date with a macro, without the date updating tomorrow?
 
J

JE McGimpsey

One way:

Public Sub InsertDate()
With ActiveCell
.Value = Date
.NumberFormat = "dd mmm yyyy"
End With
End Sub

However, simply typing CTRL-; may work for you without a macro.
 
G

Guest

See if this will do it...i'm no expert though

Sub datemacro()
With ActiveCell
.FormulaR1C1 = "=TODAY()"
.Copy
.PasteSpecial Paste:=xlPasteValues
End With
Application.CutCopyMode = False
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

Similar Threads

todays date 2
Todays date 3
Macro-total a column with different row sizes 1
conditional format 2
date popping up in error 2
Conditional Format 3
Counting Work Days 5
Today's Date 9

Top