Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default StopWatch Macros

I am trying to create two Macros linked with two Excel buttons from the forms
toolbar. I want the first button to be in cell B2 on Sheet 1 and say start.
I want the second button to be in cell J2 on Sheet 1 and say End.

I want the first button which is the start button, when it is clicked to
give me the exact time in cell D2 on Sheet 2. I want the second button which
is the end button, when it is clicked to give me the exact time in cell E2 on
Sheet 2. Do you have any ideas about how I might pull that off?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 421
Default StopWatch Macros

Hi ExcelMS,

See the suggestions of Bob Phillips
and KeepITcool at:


http://tinyurl.com/69b6nd




---
Regards.
Norman


"ExcelMS" wrote in message
...
I am trying to create two Macros linked with two Excel buttons from the
forms
toolbar. I want the first button to be in cell B2 on Sheet 1 and say
start.
I want the second button to be in cell J2 on Sheet 1 and say End.

I want the first button which is the start button, when it is clicked to
give me the exact time in cell D2 on Sheet 2. I want the second button
which
is the end button, when it is clicked to give me the exact time in cell E2
on
Sheet 2. Do you have any ideas about how I might pull that off?


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default StopWatch Macros

hi
button or any other control can't be "put" in cells. you can put them over
the cell.
and i would use command buttons from the control toolbox. they are more
suited for use on the sheet. general rule. form controls for forms. active x
controls for sheets.
but hey.....form buttons.
from the forms toolbar, click the command button and chick sheet 1 at b2 and
drag to size the button. do the same for the other button at sheet 1 at j2.
right click the first button and from the pop up, click edit text. click in
the button, back space/delete button1 and type in start. do the same for the
second button except type in end.
open the vb editor(alt+F11)
if the code window is dark gray/brown, on the menu bar, click insertmodule.
paste the following it to the now white code window.
Sub startbutton()
Sheets("Sheet2").Range("D2").Value = Time
End Sub
Sub endbutton()
Sheets("sheet2").Range("E2").Value = Time
End Sub
close the vb editor

Right click the start button and click assign macro. select startbutton.
click ok
do the same with the end button except select endbutton. click ok.

you are now live and good to go.

regards
FSt1


"ExcelMS" wrote:

I am trying to create two Macros linked with two Excel buttons from the forms
toolbar. I want the first button to be in cell B2 on Sheet 1 and say start.
I want the second button to be in cell J2 on Sheet 1 and say End.

I want the first button which is the start button, when it is clicked to
give me the exact time in cell D2 on Sheet 2. I want the second button which
is the end button, when it is clicked to give me the exact time in cell E2 on
Sheet 2. Do you have any ideas about how I might pull that off?

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default StopWatch Macros

This is terrific, thank you very much for your help!

"FSt1" wrote:

hi
button or any other control can't be "put" in cells. you can put them over
the cell.
and i would use command buttons from the control toolbox. they are more
suited for use on the sheet. general rule. form controls for forms. active x
controls for sheets.
but hey.....form buttons.
from the forms toolbar, click the command button and chick sheet 1 at b2 and
drag to size the button. do the same for the other button at sheet 1 at j2.
right click the first button and from the pop up, click edit text. click in
the button, back space/delete button1 and type in start. do the same for the
second button except type in end.
open the vb editor(alt+F11)
if the code window is dark gray/brown, on the menu bar, click insertmodule.
paste the following it to the now white code window.
Sub startbutton()
Sheets("Sheet2").Range("D2").Value = Time
End Sub
Sub endbutton()
Sheets("sheet2").Range("E2").Value = Time
End Sub
close the vb editor

Right click the start button and click assign macro. select startbutton.
click ok
do the same with the end button except select endbutton. click ok.

you are now live and good to go.

regards
FSt1


"ExcelMS" wrote:

I am trying to create two Macros linked with two Excel buttons from the forms
toolbar. I want the first button to be in cell B2 on Sheet 1 and say start.
I want the second button to be in cell J2 on Sheet 1 and say End.

I want the first button which is the start button, when it is clicked to
give me the exact time in cell D2 on Sheet 2. I want the second button which
is the end button, when it is clicked to give me the exact time in cell E2 on
Sheet 2. Do you have any ideas about how I might pull that off?

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default StopWatch Macros

Will do, thanks Norman

"Norman Jones" wrote:

Hi ExcelMS,

See the suggestions of Bob Phillips
and KeepITcool at:


http://tinyurl.com/69b6nd




---
Regards.
Norman


"ExcelMS" wrote in message
...
I am trying to create two Macros linked with two Excel buttons from the
forms
toolbar. I want the first button to be in cell B2 on Sheet 1 and say
start.
I want the second button to be in cell J2 on Sheet 1 and say End.

I want the first button which is the start button, when it is clicked to
give me the exact time in cell D2 on Sheet 2. I want the second button
which
is the end button, when it is clicked to give me the exact time in cell E2
on
Sheet 2. Do you have any ideas about how I might pull that off?





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default StopWatch Macros



"ExcelMS" wrote:

I want the first button which is the start button, when it is clicked to
give me the exact time in cell D2 on Sheet 2. I want the second button which
is the end button, when it is clicked to give me the exact time in cell E2 on
Sheet 2. Do you have any ideas about how I might pull that off?

Why macros? http://www.stopwatch-timer.com Run 2 timers, link them to a
sheet, assign a start cell. Then just collect times!
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
Stopwatch Bob Excel Discussion (Misc queries) 5 February 3rd 09 01:32 AM
StopWatch Macros ExcelMS Excel Worksheet Functions 2 June 1st 08 05:16 PM
Stopwatch time DSR_CT Excel Discussion (Misc queries) 2 February 18th 08 08:03 AM
Stopwatch query atlashill Excel Programming 15 June 26th 05 04:08 AM
Stopwatch Metolius Dad Excel Worksheet Functions 1 April 11th 05 03:14 PM


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