Preventing a command button from being clicked twice

N

NDBC

I am using excel 2003 to keep lap times in a dirt bike race. I have a command
button that is clicked to record the time the race starts. The code is below.

Private Sub StartButton_Click()
Worksheets("Timing Sheet").Range("A6").Value = Format(Now, "h:mm:ss")
End Sub

What I need to do is to ensure that the button is not clicked accidently
after the race has started. Is there a way that I can count how many times it
has been clicked and if it is more than once it comes up with a warning along
the lines of "the race has started are you sure you want to change the race
start time" with a yes/no option.

The other thing I would like to do is store a backup copy of the original
start time somewhere else in the worksheet in a way that it is nopt updated
every time the button is clicked.

Any help will be gladly appreciated.

Thank you
 
J

Jacob Skaria

I would suggest to disable the start button once the user click start and if
the user want to stop let there be another button to do that. When they hit
stop OR when the macro ends you can enable the start button.

If this post helps click Yes
 

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