Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm using office 2003 and would like to add todays date to a specific cell
during the running of a macro. What is the syntax to accomplish this? (when I record a macro I can select the cell I want but I figure the date component has to be typed into the macro manually, ie edit macro and add the required syntax) |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub AddDate()
ActiveCell = Date End Sub "Skeatt" wrote: I'm using office 2003 and would like to add todays date to a specific cell during the running of a macro. What is the syntax to accomplish this? (when I record a macro I can select the cell I want but I figure the date component has to be typed into the macro manually, ie edit macro and add the required syntax) |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Skeatt,
Try: Range("A1").Value = Date --- Regards, Norman "Skeatt" wrote in message ... I'm using office 2003 and would like to add todays date to a specific cell during the running of a macro. What is the syntax to accomplish this? (when I record a macro I can select the cell I want but I figure the date component has to be typed into the macro manually, ie edit macro and add the required syntax) |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
with activesheet.range("b99")
.value = date .numberformat = "mm/dd/yyyy" end with There's also now and time: .value = now 'includes both time & date .value = time 'just the time .value = date 'just the date Skeatt wrote: I'm using office 2003 and would like to add todays date to a specific cell during the running of a macro. What is the syntax to accomplish this? (when I record a macro I can select the cell I want but I figure the date component has to be typed into the macro manually, ie edit macro and add the required syntax) -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro to goto specific cell (todays date) | Excel Discussion (Misc queries) | |||
Why todays date shows up as #### in excel doc. | Excel Discussion (Misc queries) | |||
Excel 2000 - find todays date | Excel Discussion (Misc queries) | |||
In Excel, Get todays date in a cell | Excel Discussion (Misc queries) | |||
how is the syntax to replace a date, recorded within a macro with a cell value ? | Excel Programming |