Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Date Function problem
Ive set up a macro assigned to a button that inserts the date into th selected cell via the date function and then moves cursor one column t the right. When the date is inserted the cursor moves to cell to th right just fine. The problem is that when I use the macro to insert the date and tim into another cell at a later time or date, all of the other date change to the most recent one. Am i cra-z or should this not happen? Thank -- VW_Dic ----------------------------------------------------------------------- VW_Dick's Profile: http://www.excelforum.com/member.php...fo&userid=2684 View this thread: http://www.excelforum.com/showthread.php?threadid=40089 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Date Function problem
If you are inserting a formula, it will always update when a
calculation is performed. To insert a static date, one that will not change, use code like ActiveCell.Value = Now -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "VW_Dick" wrote in message ... Ive set up a macro assigned to a button that inserts the date into the selected cell via the date function and then moves cursor one column to the right. When the date is inserted the cursor moves to cell to the right just fine. The problem is that when I use the macro to insert the date and time into another cell at a later time or date, all of the other dates change to the most recent one. Am i cra-z or should this not happen? Thanks -- VW_Dick ------------------------------------------------------------------------ VW_Dick's Profile: http://www.excelforum.com/member.php...o&userid=26847 View this thread: http://www.excelforum.com/showthread...hreadid=400898 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Date Function problem
What code does your macro use to insert the date? I tried Activecell = Date
and it worked in the way you want i.e. the result is different if the date changes "VW_Dick" wrote: Ive set up a macro assigned to a button that inserts the date into the selected cell via the date function and then moves cursor one column to the right. When the date is inserted the cursor moves to cell to the right just fine. The problem is that when I use the macro to insert the date and time into another cell at a later time or date, all of the other dates change to the most recent one. Am i cra-z or should this not happen? Thanks -- VW_Dick ------------------------------------------------------------------------ VW_Dick's Profile: http://www.excelforum.com/member.php...o&userid=26847 View this thread: http://www.excelforum.com/showthread...hreadid=400898 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Date Function problem
If you use this: ActiveCell.Value = Now
It would not change the date/time, when you use it later on in a other cell. -- Ronald Ferdinandus http://www.ro-pay.nl "VW_Dick" wrote: Ive set up a macro assigned to a button that inserts the date into the selected cell via the date function and then moves cursor one column to the right. When the date is inserted the cursor moves to cell to the right just fine. The problem is that when I use the macro to insert the date and time into another cell at a later time or date, all of the other dates change to the most recent one. Am i cra-z or should this not happen? Thanks -- VW_Dick ------------------------------------------------------------------------ VW_Dick's Profile: http://www.excelforum.com/member.php...o&userid=26847 View this thread: http://www.excelforum.com/showthread...hreadid=400898 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Date Function problem
If you use this: ActiveCell.Value = Now
It would not change the date/time, when you use it later on in a other cell. -- Ronald Ferdinandus http://www.ro-pay.nl "VW_Dick" wrote: Ive set up a macro assigned to a button that inserts the date into the selected cell via the date function and then moves cursor one column to the right. When the date is inserted the cursor moves to cell to the right just fine. The problem is that when I use the macro to insert the date and time into another cell at a later time or date, all of the other dates change to the most recent one. Am i cra-z or should this not happen? Thanks -- VW_Dick ------------------------------------------------------------------------ VW_Dick's Profile: http://www.excelforum.com/member.php...o&userid=26847 View this thread: http://www.excelforum.com/showthread...hreadid=400898 |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Date Function problem
sounds like you are putting in the formula
=Now() instead use the vba function now ActiveCell.Value = Now ActiveCell.offset(0,1).Select -- Regards, Tom Ogilvy "VW_Dick" wrote in message ... Ive set up a macro assigned to a button that inserts the date into the selected cell via the date function and then moves cursor one column to the right. When the date is inserted the cursor moves to cell to the right just fine. The problem is that when I use the macro to insert the date and time into another cell at a later time or date, all of the other dates change to the most recent one. Am i cra-z or should this not happen? Thanks -- VW_Dick ------------------------------------------------------------------------ VW_Dick's Profile: http://www.excelforum.com/member.php...o&userid=26847 View this thread: http://www.excelforum.com/showthread...hreadid=400898 |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Date Function problem
Wow, thanks for all the replys. I used the code : ActiveCell.Value = Now ActiveCell.Offset(0, 1).Select and it works exactly how i need it to. Thanks to everyone for all the help Richard -- VW_Dick ------------------------------------------------------------------------ VW_Dick's Profile: http://www.excelforum.com/member.php...o&userid=26847 View this thread: http://www.excelforum.com/showthread...hreadid=400898 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Function to lookup date on tab in excel and populate date on calen | Excel Worksheet Functions | |||
Exel increment date problem wrt todays date. | Excel Worksheet Functions | |||
Date Formula Problem - Leave date blank if Null | Excel Worksheet Functions | |||
If Function - Date Problem | Excel Worksheet Functions | |||
Calculating days between current date and a date in future NETWORKDAYS() function | Excel Worksheet Functions |