Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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/

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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/



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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/

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default 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




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default 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

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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/



  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

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
date in Cell to change colors if the date is beyond today's date Pete Elbert Excel Discussion (Misc queries) 2 June 6th 09 06:31 AM
Reading File Name in VB Macro that contains today's date dhstein Excel Discussion (Misc queries) 10 November 13th 08 02:48 AM
Macro to jump to today's date Victor Delta Excel Discussion (Misc queries) 9 July 4th 06 08:52 PM
Macro to filter on today's date Mike Boardman Excel Programming 2 October 3rd 03 01:49 AM
Macro to filter on today's date Mike B[_4_] Excel Programming 0 October 1st 03 09:17 AM


All times are GMT +1. The time now is 01:15 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"