ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   A macro for the today's date...not the current date (https://www.excelbanter.com/excel-programming/290665-macro-todays-date-not-current-date.html)

abxy[_18_]

A macro for the today's date...not the current date
 
Hi,

I know that Ctrl+; will enter the today's date into an activecell.

Anyway that I can make that (Ctrl+;) into a macro or something so that
I can make it a button on the toolbar. and um, btw, using the TODAY
function isn't my answer becuase it always updates to reflect the
current date. I'm keeping records, so it's no use if the dates always
change.

Thanks in advance


---
Message posted from http://www.ExcelForum.com/


Bob Phillips[_6_]

A macro for the today's date...not the current date
 

Activecell.Value = Format(Date,"dd mmm yyyy")

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"abxy " wrote in message
...
Hi,

I know that Ctrl+; will enter the today's date into an activecell.

Anyway that I can make that (Ctrl+;) into a macro or something so that
I can make it a button on the toolbar. and um, btw, using the TODAY
function isn't my answer becuase it always updates to reflect the
current date. I'm keeping records, so it's no use if the dates always
change.

Thanks in advance


---
Message posted from http://www.ExcelForum.com/




Tom Ogilvy

A macro for the today's date...not the current date
 

ActiveCell.Formula = "=Today()"
ActiveCell.Formula = ActiveCell.Value

could be an answer although Bob's would be better.

--
Regards,
Tom Ogilvy



abxy wrote in message
...
Hi,

I know that Ctrl+; will enter the today's date into an activecell.

Anyway that I can make that (Ctrl+;) into a macro or something so that
I can make it a button on the toolbar. and um, btw, using the TODAY
function isn't my answer becuase it always updates to reflect the
current date. I'm keeping records, so it's no use if the dates always
change.

Thanks in advance


---
Message posted from http://www.ExcelForum.com/




abxy[_19_]

A macro for the today's date...not the current date
 
Bob's suggestion is giving me a formula that puts =TODAY() in the active
cell. This won't work. the TODAY function is giving me the "current"
date _not_ "today's" date

...If I come back tomorrow, the cell with the TODAY formula in will
reflect the current date instead of the date that I entered it.

You see what i mean when I say that I need a macro that will put
today's date in the active cell, not the "current" date?

again, i'm keeping records, so it's no use to use TODAY if the date
constantly changes.


---
Message posted from http://www.ExcelForum.com/


Frank Kabel

A macro for the today's date...not the current date
 
Bob's suggestion is giving me a formula that puts =TODAY() in the
active cell. This won't work. the TODAY function is giving me the
"current" date _not_ "today's" date

..If I come back tomorrow, the cell with the TODAY formula in will
reflect the current date instead of the date that I entered it.

You see what i mean when I say that I need a macro that will put
today's date in the active cell, not the "current" date?

again, i'm keeping records, so it's no use to use TODAY if the date
constantly changes.


---
Message posted from http://www.ExcelForum.com/


Hi
if you put Bob's suggestion into a macro (e.g. Commandbutton or using
the worksheet_change event) the value won't change. Find below the
example code for a command button who will insert the date into the
active cell
Private Sub CommandButton1_Click()
ActiveCell.Value = Now
End Sub

Frank



Dave Peterson[_3_]

A macro for the today's date...not the current date
 
That was Tom's suggestion. But look at his code once more. He converted that
formula to a value--it won't change until you change it.



"abxy <" wrote:

Bob's suggestion is giving me a formula that puts =TODAY() in the active
cell. This won't work. the TODAY function is giving me the "current"
date _not_ "today's" date

..If I come back tomorrow, the cell with the TODAY formula in will
reflect the current date instead of the date that I entered it.

You see what i mean when I say that I need a macro that will put
today's date in the active cell, not the "current" date?

again, i'm keeping records, so it's no use to use TODAY if the date
constantly changes.

---
Message posted from http://www.ExcelForum.com/


--

Dave Peterson


Tom Ogilvy

A macro for the today's date...not the current date
 
Neither Bob's suggestion or mine puts a changing date in the cell. I
offered the one using today to illustrate that today could be used to
generate the date. Your persistence in complaining while clearly wrong
illustrates you have little understanding of what has been provided.
Perhaps if you try it you will have a better understanding.

--
Regards,
Tom Ogilvy




abxy wrote in message
...
Bob's suggestion is giving me a formula that puts =TODAY() in the active
cell. This won't work. the TODAY function is giving me the "current"
date _not_ "today's" date

..If I come back tomorrow, the cell with the TODAY formula in will
reflect the current date instead of the date that I entered it.

You see what i mean when I say that I need a macro that will put
today's date in the active cell, not the "current" date?

again, i'm keeping records, so it's no use to use TODAY if the date
constantly changes.


---
Message posted from http://www.ExcelForum.com/




abxy[_20_]

A macro for the today's date...not the current date
 
Alright, sorry bout' that. You all's solutions do work, I suppose I wa
just entering them incorrectly. Anyhoo, Frank Kabel helped me find a
answer my question on another thread just a minute ago.

I can't thankyou all enough for the help that you offer me, It'
greatly appreciated

--
Message posted from http://www.ExcelForum.com



All times are GMT +1. The time now is 07:46 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com