• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

I am trying to build a simple timer.

yeto

New Member
I am working from this webpage:

https://chandoo.org/wp/building-a-simple-timer-using-excel-vba-to-track-my-rubiks-cube-solving-speed-case-study/

This is what I have tried so far:
step 1 = open excel spreadsheet (MS Office Pro 2010)
step 2 = label column Time Stamp and Duration
step 3 = I did not do "ctrl + t"
step 4 = Insert tab > shapes > draw button
step 5 = typed "Start" without quotations in blank cell
step 6 = tried to name the cell timer.button.label and got the following message: You must enter a valid reference you want to go to, or type a valid name for the selection.

Could someone please help as to what I am doing wrong so I can move to the next step?

Thank you in advance for any help,
yeto
 

Hui

Excel Ninja
Staff member
Yeto

Firstly, Welcome to the Chandoo.org Forums

Can you please attach a sample of what you have done so far?
 

yeto

New Member
After looking at some YouTube videos I realized I needed to be in design mode. This is what I have so far. Can this be changed so that the "stop" button will be red versus blue? Also, can the "duration" be seconds versus minutes?
Code:
Sub startStopTimer()
    If Range("timer.button.label") = "Start" Then
        Range("time.stamp.start").Offset(Range("count.of.timestamps") + 1).Value = Now
        Range("timer.button.label") = "Stop"
    Else
        Range("time.stamp.start").Offset(Range("count.of.timestamps"), 1).Value = Now - Range("time.stamp.start").Offset(Range("count.of.timestamps"))
        Range("timer.button.label") = "Start"
    End If
End Sub
 

yeto

New Member
From the instruction page (link below) when I try to enter =timer.button.label I am getting the following message: "Reference is not valid."

I noticed on the author's worksheet that in that cell instead of =timer.button.label it is showing =$C$3.

Can someone explain this step to me and what I am doing wrong? Should I be entering =$C$3 versus =timer.button.label?

I am using Excel 2010.

https://chandoo.org/wp/building-a-s...rack-my-rubiks-cube-solving-speed-case-study/

Thank you in advance for any help,
yeto
 
Top