Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default how to create a timer in excel

I would like to create a timer in excel so I can do time and motion studies
quick and easy. It would need a start stop button and each time you stopped
it would start a new time line to continue the process
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default how to create a timer in excel

Here we go..

Try the below in a new workbook.

1. From menu ViewToolBarsSelect Control Toolbox
2. From the control toolbar click 'Command Button'
3. Point to a cell in worksheet and draw the button.
4. Right click the buttonProperties and in Properties window enter Caption
as 'Start'
5. Double click the command button and paste the below code within the click
event.

Private Sub CommandButton1_Click()
lngCol = IIf(CommandButton1.Caption = "Stop", 2, 1)
lngRow = ActiveSheet.Cells(Rows.Count, lngCol).End(xlUp).Row + 1
Cells(lngRow, lngCol) = Now()
CommandButton1.Caption = IIf(CommandButton1.Caption = "Stop", "Start", "Stop")
End Sub

6. From workbook toolbar 'control toolbox' click on 'Exit Design mode'
8. Button click and try. This should record the start time and end time in
Col A
and B respectively

PS: If you are new to macros set the Security level to low/medium in
(Tools|Macro|Security).

If this post helps click Yes
---------------
Jacob Skaria


"Haych" wrote:

I would like to create a timer in excel so I can do time and motion studies
quick and easy. It would need a start stop button and each time you stopped
it would start a new time line to continue the process

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default how to create a timer in excel

Forgot to mention to format ColA and ColB to display time in date+time in
hh:mm:ss or otherwise the default one would be hh:mm.

I have modified the code as below to reflect the number of seconds between
start and stop in Col C..Test and feedback

Private Sub CommandButton1_Click()
lngCol = IIf(CommandButton1.Caption = "Stop", 2, 1)
lngRow = ActiveSheet.Cells(Rows.Count, lngCol).End(xlUp).Row + 1
Cells(lngRow, lngCol) = Now()
If lngCol = 2 Then Cells(lngRow, 3) = _
DateDiff("s", CDate(Cells(lngRow, 1)), Cells(lngRow, 2))
CommandButton1.Caption = IIf(CommandButton1.Caption = "Stop", "Start", "Stop")
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"Jacob Skaria" wrote:

Here we go..

Try the below in a new workbook.

1. From menu ViewToolBarsSelect Control Toolbox
2. From the control toolbar click 'Command Button'
3. Point to a cell in worksheet and draw the button.
4. Right click the buttonProperties and in Properties window enter Caption
as 'Start'
5. Double click the command button and paste the below code within the click
event.

Private Sub CommandButton1_Click()
lngCol = IIf(CommandButton1.Caption = "Stop", 2, 1)
lngRow = ActiveSheet.Cells(Rows.Count, lngCol).End(xlUp).Row + 1
Cells(lngRow, lngCol) = Now()
CommandButton1.Caption = IIf(CommandButton1.Caption = "Stop", "Start", "Stop")
End Sub

6. From workbook toolbar 'control toolbox' click on 'Exit Design mode'
8. Button click and try. This should record the start time and end time in
Col A
and B respectively

PS: If you are new to macros set the Security level to low/medium in
(Tools|Macro|Security).

If this post helps click Yes
---------------
Jacob Skaria


"Haych" wrote:

I would like to create a timer in excel so I can do time and motion studies
quick and easy. It would need a start stop button and each time you stopped
it would start a new time line to continue the process

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
Is there a day timer template in word or excel? Lisa Excel Discussion (Misc queries) 1 January 9th 13 09:03 PM
How to create a countdown timer in a worksheet Fred Excel Worksheet Functions 2 September 23rd 07 10:50 AM
Pop up timer for excel jlclyde Excel Discussion (Misc queries) 1 August 31st 07 10:08 PM
EXCEL TIMER CONTROL Avinash Shukla Links and Linking in Excel 0 June 28th 07 11:38 AM
Stopping a Timer / Running a timer simultaneously on Excel Paul23 Excel Discussion (Misc queries) 1 March 10th 06 12:08 PM


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