#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Date Macro

How can I enter todays date with a macro, without the date updating tomorrow?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,624
Default Date Macro

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.


In article ,
in_trouble wrote:

How can I enter todays date with a macro, without the date updating tomorrow?

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default Date Macro

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

"in_trouble" wrote:

How can I enter todays date with a macro, without the date updating tomorrow?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
2 different ?'s: Date? Macro? RS Excel Worksheet Functions 11 November 2nd 06 11:53 PM
Date Formatting in a Macro [email protected] Excel Discussion (Misc queries) 3 May 19th 06 02:09 AM
Insert date in macro George Gee New Users to Excel 12 April 17th 06 05:44 AM
Date/Time Macro Michael Link Excel Discussion (Misc queries) 6 February 15th 05 12:55 AM
Date macro Hiking Excel Discussion (Misc queries) 9 February 3rd 05 12:40 AM


All times are GMT +1. The time now is 04:24 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"