1. Welcome to Chandoo.org Forums. Short message for you

    Hi Guest,

    Thanks for joining Chandoo.org forums. We are here to make you awesome in Excel. Before you post your first question, please read this short introduction guide. When posting or responding to questions please remember our values at Chandoo.org are: Humility, Passion, Fun, Awesomeness, Simplicity, Sharing Remember that we have people here for whom English is not there first language and we need to allow for this in our dealings.

    Yours,
    Chandoo
  2. 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...

  3. 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.

Discussion in 'VBA Macros' started by yeto, Dec 4, 2018.

  1. yeto

    yeto New Member

    Messages:
    4
    I am working from this webpage:

    https://chandoo.org/wp/building-a-s...rack-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
  2. Hui

    Hui Excel Ninja Staff Member

    Messages:
    11,667
    Yeto

    Firstly, Welcome to the Chandoo.org Forums

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

    yeto New Member

    Messages:
    4
    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 (vb):
    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
  4. Belleke

    Belleke Active Member

    Messages:
    481
    Hi Yeto,
    Does this help?
    See attached.

    Attached Files:

    yeto likes this.
  5. yeto

    yeto New Member

    Messages:
    4
    This should help I just hope I am smart enough to use the information.

    Thank you,
    yeto
  6. yeto

    yeto New Member

    Messages:
    4
    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

Share This Page