Macro to take a cell at a specific time and put it another cell Hello, Is there
ID: 3565678 • Letter: M
Question
Macro to take a cell at a specific time and put it another cell
Hello,
Is there anyway to create a macro that will take a cell at a specific time (lets say midnight every day) and place it in another cell. For instance, lets say cell A1 has a stock quote that is updating every minute. Can I take the value of cell A1 at midnight and place it in Cell A1 on another sheet? For the next day at midnightt then it would take the value of A1 and place it in A!2 on the other sheet and it would do this on and on everys day.
Thanks!!
Explanation / Answer
Sure you can do this. but you need 2 short macros. 1 to do the move that you want and another to set the trigger time. So the code would look something like this:
sub MoveTheData()
workbooks("otherworkbook").sheets(1).range("a1")=thisworkbook.sheets(1).range("a1")
end sub
sub RunAtMidnight()
application.ontime timevalue("00:00:00"), "movethedata"
end sub
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.