Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,101
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,101
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 422
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default 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
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
Calculating business hours between start and stop time Belinda7237 Excel Worksheet Functions 3 April 16th 08 11:50 PM
Stop time - start time calculation squack21 Excel Worksheet Functions 5 December 10th 07 03:20 PM
Formula to find Stop Time from Start Time and Total Minutes Jonathan Bickett Excel Worksheet Functions 5 March 7th 07 05:22 PM
Start/Stop Macro Button Paul987 Excel Discussion (Misc queries) 1 July 10th 06 05:14 PM
How can I get elapsed time between AM start/PM stop khacmac Excel Worksheet Functions 1 February 1st 05 11:17 PM


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