Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default A stopwatch to record time in a cell

Hi,

I'm new to programming in excel, actually this is the first time.
What I'm trying to do is have a worksheet capture the time of a task.
I've been able to creat a stopwatch in excel using the following:

Option Explicit

Private startTime As Single

Private Sub StartButton_Click()
startTime = Timer
End Sub

Private Sub StopButton_Click()
Dim finalTime As Single
finalTime = Timer - startTime
MsgBox Format(finalTime, "0.00")
End Sub

What I want to have is this stopwatch on the worksheet, but to record
the time in a cell and then move down to the next cell after
resetting. I may not need the stopwatch, but can use the Now() and
subtract the times. Can anyone point me in the right direction to do
this or possible help me get started?

Thank you in advance for your assistance.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 132
Default A stopwatch to record time in a cell

Hi Gabe;

You can use;

activecell = Format(finalTime, "0.00")

or

Range("D1") = Format(finalTime, "0.00")
Thanks,

Greg
-----Original Message-----
Hi,

I'm new to programming in excel, actually this is the

first time.
What I'm trying to do is have a worksheet capture the

time of a task.
I've been able to creat a stopwatch in excel using the

following:

Option Explicit

Private startTime As Single

Private Sub StartButton_Click()
startTime = Timer
End Sub

Private Sub StopButton_Click()
Dim finalTime As Single
finalTime = Timer - startTime
MsgBox Format(finalTime, "0.00")
End Sub

What I want to have is this stopwatch on the worksheet,

but to record
the time in a cell and then move down to the next cell

after
resetting. I may not need the stopwatch, but can use the

Now() and
subtract the times. Can anyone point me in the right

direction to do
this or possible help me get started?

Thank you in advance for your assistance.
.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default A stopwatch to record time in a cell





*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default A stopwatch to record time in a cell



Thank you. How or where would I put this into what I alrady have?


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
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
Record time by formula karim Excel Worksheet Functions 10 April 29th 10 01:36 PM
Stopwatch time DSR_CT Excel Discussion (Misc queries) 2 February 18th 08 08:03 AM
How can I get the system date & time for different cell record Get System Date & Time Excel Discussion (Misc queries) 8 January 9th 08 01:20 AM
how do i format an excel cell for stopwatch times mm:ss? John Hansen Excel Discussion (Misc queries) 1 September 19th 07 08:34 PM
How do I get one cell to record the time another cell was changed. Reigning in Seattle Excel Discussion (Misc queries) 1 December 17th 04 07:45 PM


All times are GMT +1. The time now is 08:22 AM.

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"