Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Start & Stop Time button
I have made a worksheet to track my daily projects. Instead of typing the
date & time each time I switch tasks, I tried to create a button that I would click. But when I close & open the form back up the last cell I utilized the following code updates to the current time instead staying at the original time. Code Created: Private Sub cmd_time_Click() ActiveCell.Clear ActiveCell.FormulaR1C1 = "=NOW()" End Sub Any help is appreciated, as always thank you to all that answer my questions! -- Thanks, Andy |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Start & Stop Time button
It's updateing because you entering the formula now() so whenevr the sheet
recalculates it will update the value. Try:- Private Sub cmd_time_Click() ActiveCell.Clear ActiveCell.Value = Time End Sub Mike "Andy" wrote: I have made a worksheet to track my daily projects. Instead of typing the date & time each time I switch tasks, I tried to create a button that I would click. But when I close & open the form back up the last cell I utilized the following code updates to the current time instead staying at the original time. Code Created: Private Sub cmd_time_Click() ActiveCell.Clear ActiveCell.FormulaR1C1 = "=NOW()" End Sub Any help is appreciated, as always thank you to all that answer my questions! -- Thanks, Andy |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Start & Stop Time button
Thank you. So, since I do all the changes in the same day I would assume that
I would just have to put the data in a seperate cell. My current format looks like this "03/26/2007 07:00" -- Thanks, Andy "Mike" wrote: It's updateing because you entering the formula now() so whenevr the sheet recalculates it will update the value. Try:- Private Sub cmd_time_Click() ActiveCell.Clear ActiveCell.Value = Time End Sub Mike "Andy" wrote: I have made a worksheet to track my daily projects. Instead of typing the date & time each time I switch tasks, I tried to create a button that I would click. But when I close & open the form back up the last cell I utilized the following code updates to the current time instead staying at the original time. Code Created: Private Sub cmd_time_Click() ActiveCell.Clear ActiveCell.FormulaR1C1 = "=NOW()" End Sub Any help is appreciated, as always thank you to all that answer my questions! -- Thanks, Andy |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Start & Stop Time button
Format cell as
dd/mm/yyyy hh:mm and use Private Sub cmd_time_Click() ActiveCell.Clear ActiveCell.Value = Date & Time End Sub "Andy" wrote: Thank you. So, since I do all the changes in the same day I would assume that I would just have to put the data in a seperate cell. My current format looks like this "03/26/2007 07:00" -- Thanks, Andy "Mike" wrote: It's updateing because you entering the formula now() so whenevr the sheet recalculates it will update the value. Try:- Private Sub cmd_time_Click() ActiveCell.Clear ActiveCell.Value = Time End Sub Mike "Andy" wrote: I have made a worksheet to track my daily projects. Instead of typing the date & time each time I switch tasks, I tried to create a button that I would click. But when I close & open the form back up the last cell I utilized the following code updates to the current time instead staying at the original time. Code Created: Private Sub cmd_time_Click() ActiveCell.Clear ActiveCell.FormulaR1C1 = "=NOW()" End Sub Any help is appreciated, as always thank you to all that answer my questions! -- Thanks, Andy |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Start & Stop Time button
add a line:
ActiveCell.Value = ActiveCell.Value Making it: Private Sub cmd_time_Click() ActiveCell.Clear ActiveCell.FormulaR1C1 = "=NOW()" ActiveCell.Value = ActiveCell.Value End Sub HTH Jim May "Andy" wrote in message : I have made a worksheet to track my daily projects. Instead of typing the date & time each time I switch tasks, I tried to create a button that I would click. But when I close & open the form back up the last cell I utilized the following code updates to the current time instead staying at the original time. Code Created: Private Sub cmd_time_Click() ActiveCell.Clear ActiveCell.FormulaR1C1 = "=NOW()" End Sub Any help is appreciated, as always thank you to all that answer my questions! -- Thanks, Andy |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Start & Stop Time button
Private Sub cmd_time_Click()
ActiveCell.Clear ActiveCell.Value = Now End Sub This puts the hard coded Date and Time in the cell as your code previously did, but it doesn't recalculate. If that is what you are asking. -- Regards, Tom Ogilvy "Andy" wrote: Thank you. So, since I do all the changes in the same day I would assume that I would just have to put the data in a seperate cell. My current format looks like this "03/26/2007 07:00" -- Thanks, Andy "Mike" wrote: It's updateing because you entering the formula now() so whenevr the sheet recalculates it will update the value. Try:- Private Sub cmd_time_Click() ActiveCell.Clear ActiveCell.Value = Time End Sub Mike "Andy" wrote: I have made a worksheet to track my daily projects. Instead of typing the date & time each time I switch tasks, I tried to create a button that I would click. But when I close & open the form back up the last cell I utilized the following code updates to the current time instead staying at the original time. Code Created: Private Sub cmd_time_Click() ActiveCell.Clear ActiveCell.FormulaR1C1 = "=NOW()" End Sub Any help is appreciated, as always thank you to all that answer my questions! -- Thanks, Andy |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Start & Stop Time button
Thank you
-- Thanks, Andy "JMay" wrote: add a line: ActiveCell.Value = ActiveCell.Value Making it: Private Sub cmd_time_Click() ActiveCell.Clear ActiveCell.FormulaR1C1 = "=NOW()" ActiveCell.Value = ActiveCell.Value End Sub HTH Jim May "Andy" wrote in message : I have made a worksheet to track my daily projects. Instead of typing the date & time each time I switch tasks, I tried to create a button that I would click. But when I close & open the form back up the last cell I utilized the following code updates to the current time instead staying at the original time. Code Created: Private Sub cmd_time_Click() ActiveCell.Clear ActiveCell.FormulaR1C1 = "=NOW()" End Sub Any help is appreciated, as always thank you to all that answer my questions! -- Thanks, Andy |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
Start & Stop Time button
Thank you
-- Thanks, Andy "Mike" wrote: Format cell as dd/mm/yyyy hh:mm and use Private Sub cmd_time_Click() ActiveCell.Clear ActiveCell.Value = Date & Time End Sub "Andy" wrote: Thank you. So, since I do all the changes in the same day I would assume that I would just have to put the data in a seperate cell. My current format looks like this "03/26/2007 07:00" -- Thanks, Andy "Mike" wrote: It's updateing because you entering the formula now() so whenevr the sheet recalculates it will update the value. Try:- Private Sub cmd_time_Click() ActiveCell.Clear ActiveCell.Value = Time End Sub Mike "Andy" wrote: I have made a worksheet to track my daily projects. Instead of typing the date & time each time I switch tasks, I tried to create a button that I would click. But when I close & open the form back up the last cell I utilized the following code updates to the current time instead staying at the original time. Code Created: Private Sub cmd_time_Click() ActiveCell.Clear ActiveCell.FormulaR1C1 = "=NOW()" End Sub Any help is appreciated, as always thank you to all that answer my questions! -- Thanks, Andy |
#9
Posted to microsoft.public.excel.programming
|
|||
|
|||
Start & Stop Time button
Excellent, thank you. How do I learn more about these so I don't have to ask
such simple questions? -- Thanks, Andy "Tom Ogilvy" wrote: Private Sub cmd_time_Click() ActiveCell.Clear ActiveCell.Value = Now End Sub This puts the hard coded Date and Time in the cell as your code previously did, but it doesn't recalculate. If that is what you are asking. -- Regards, Tom Ogilvy "Andy" wrote: Thank you. So, since I do all the changes in the same day I would assume that I would just have to put the data in a seperate cell. My current format looks like this "03/26/2007 07:00" -- Thanks, Andy "Mike" wrote: It's updateing because you entering the formula now() so whenevr the sheet recalculates it will update the value. Try:- Private Sub cmd_time_Click() ActiveCell.Clear ActiveCell.Value = Time End Sub Mike "Andy" wrote: I have made a worksheet to track my daily projects. Instead of typing the date & time each time I switch tasks, I tried to create a button that I would click. But when I close & open the form back up the last cell I utilized the following code updates to the current time instead staying at the original time. Code Created: Private Sub cmd_time_Click() ActiveCell.Clear ActiveCell.FormulaR1C1 = "=NOW()" End Sub Any help is appreciated, as always thank you to all that answer my questions! -- Thanks, Andy |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Calculating business hours between start and stop time | Excel Worksheet Functions | |||
Stop time - start time calculation | Excel Worksheet Functions | |||
Formula to find Stop Time from Start Time and Total Minutes | Excel Worksheet Functions | |||
Start/Stop Macro Button | Excel Discussion (Misc queries) | |||
How can I get elapsed time between AM start/PM stop | Excel Worksheet Functions |