Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro / VB / Instert Date Question
I am building a macro and would like the macro to update a cell to say "Data
Locked - <date when macro was run". I have tried to used the CTRL+; command to insert the date, but when recording the macro, the actual date text is recorded and I am stuck with a date that is hardcoded to the time I built the macro. Any thoughts? Thanks! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro / VB / Instert Date Question
Hi
not sure if i'm missing something here, but if in your macro it has something along the lines of 'your current code Range("A1").value = Format(NOW(),"dd/mm/yyyy") 'your current code every time you run the macro, the date of running the macro will be inserted into A1 Cheers JulieD "Spyder" wrote in message ... I am building a macro and would like the macro to update a cell to say "Data Locked - <date when macro was run". I have tried to used the CTRL+; command to insert the date, but when recording the macro, the actual date text is recorded and I am stuck with a date that is hardcoded to the time I built the macro. Any thoughts? Thanks! |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro / VB / Instert Date Question
Activesheet,Range("H10").Value = "Data Locked - " & Format(Date,"yyyy-mm-dd") -- HTH RP (remove nothere from the email address if mailing direct) "Spyder" wrote in message ... I am building a macro and would like the macro to update a cell to say "Data Locked - <date when macro was run". I have tried to used the CTRL+; command to insert the date, but when recording the macro, the actual date text is recorded and I am stuck with a date that is hardcoded to the time I built the macro. Any thoughts? Thanks! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 2007 Macro/VB Question DDE Question | Excel Worksheet Functions | |||
Can no longer instert symbol in text box | Excel Discussion (Misc queries) | |||
Date question | Excel Worksheet Functions | |||
A macro for the today's date...not the current date | Excel Programming | |||
Date Question | Excel Programming |