StopWatch Macros

E

ExcelMS

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?
 
F

FSt1

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 insert>module.
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
 
S

Stopwatch

ExcelMS said:
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!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top