View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
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