+ Reply to Thread
Results 1 to 7 of 7

building a better egg timer...

  1. #1
    Registered User
    Join Date
    01-07-2010
    Location
    South Carolina
    MS-Off Ver
    Excel 2007
    Posts
    18

    Thumbs down building a better egg timer...

    Hey all....need some help trying to build a simple "egg timer". (Don't ask why) I thought this would be super simple and I was basically on my way until I hit a little snag. The basic idea is as follows:

    I set up an embedded command button right on the worksheet to launch a bit of vba code.

    The code launches a simple form that uses a spin button connected with a text box. You can click the spin button and select a number between 1 and 120 that should be displayed in the text box.

    As far as I know, I am pretty good up until this point. Problem is that I want to take the value that is entered into the text box via the spinner button and launch a form that says something like "Time is up" at a time that is x minutes in the future, where x is the number dialed in by the spinner box. Problem I am having is that I don't know how to use the onTime function with variables....

    here is a copy of my bogus code associated with the user form described above: (known problem area in bold at the OKButton section)

    Please Login or Register  to view this content.
    Thanks for the help.
    m.hatter

  2. #2
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: building a better egg timer...

    Hi m.hatter
    Have a look at this attached example by John Walkenbach
    hope it helps
    Attached Files Attached Files
    If the solution helped please donate to RSPCA

    Site worth visiting: Rabbitohs

  3. #3
    Registered User
    Join Date
    01-07-2010
    Location
    South Carolina
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: building a better egg timer...

    Hey Pike....
    Funny you should post Walkenbach. I just bought his book and that it what has led me to this forum. Small world around here. Anyways, unless I am missing something I don't think that the progress indicator can help me here. I want a timer running in the background that pops up with a userform after the time has expired.

    The time would be set in minutes by the user using the spinner button. So in short...why doesn't this code work?
    Please Login or Register  to view this content.
    Of course, the time interval should have been in the minutes section instead of the seconds section, but either way it was still not working. Thanks for the help.
    m.hatter
    Last edited by m.hatter; 01-07-2010 at 12:18 PM. Reason: adding code tags

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: building a better egg timer...

    Please edit your post to add code tags.

    Thanks.
    Entia non sunt multiplicanda sine necessitate

  5. #5
    Registered User
    Join Date
    01-07-2010
    Location
    South Carolina
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: building a better egg timer...

    ....I think the answer is in here....

    http://www.cpearson.com/Excel/OnTime.aspx

    Just found the "search" option. uhhhh.
    m.hatter

  6. #6
    Registered User
    Join Date
    01-07-2010
    Location
    South Carolina
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: building a better egg timer...

    Ok...So I don't know if this is a "great" solution, but it actual does what I wanted it to do, so I guess I will call that a success.

    Please Login or Register  to view this content.
    m.hatter

  7. #7
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: building a better egg timer...

    well done - if it works its a winner

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1