+ Reply to Thread
Results 1 to 1 of 1

timer for 30 minutes and timer based events

  1. #1
    Registered User
    Join Date
    09-11-2014
    Location
    mumbai india
    MS-Off Ver
    2010
    Posts
    2

    timer for 30 minutes and timer based events

    I want to run a timer for a bidding process. The bidding process starts at 9.30am. The bidder will put a quote say 40 .. in say column Q4. The timer starts for 30 minutes. If any bidder quotes within 30 minutes then we will put it in column Q5. Q5 should be < Q4. If it is less than Q4 and greater than zero and before the timer of 30 minutes then the timer is restarted for 30 minutes. If nobody bids within the 30 minutes, then he is the winner and a message "Winner" should be printed in R5. If anybody bids within 30 minutes it will be put in Q6.If Q6 is less than Q4 and Q5 then message "Winner" should be printed in R6. This should go on till 8:00 PM. If nobody bids within 30 minutes then the lowest bidder should be the winner.

    can you give me a macro for the above...

    Thanks..
    Mohak

  2. #2
    Forum Contributor Cerbera's Avatar
    Join Date
    07-06-2010
    Location
    Rotorua, New Zealand
    MS-Off Ver
    Excel 2007, 2013, 2016 & 365
    Posts
    137

    Re: timer for 30 minutes and timer based events

    I'd make use of the VBA OnTime function. Some notes on this are below. Make your macro reset the time to 30 mins under the relevant conditions.

    Schedules a procedure to be run at a specified time in the future (either at a specific time of day or after a specific amount of time has passed).

    expression.OnTime(EarliestTime, Procedure, LatestTime, Schedule)

    expression Required. An expression that returns an Application object.

    EarliestTime Required Variant. The time when you want this procedure to be run.

    Procedure Required String. The name of the procedure to be run.

    LatestTime Optional Variant. The latest time at which the procedure can be run. For example, if LatestTime is set to EarliestTime + 30 and Microsoft Excel is not in Ready, Copy, Cut, or Find mode at EarliestTime because another procedure is running, Microsoft Excel will wait 30 seconds for the first procedure to complete. If Microsoft Excel is not in Ready mode within 30 seconds, the procedure won’t be run. If this argument is omitted, Microsoft Excel will wait until the procedure can be run.

    Schedule Optional Variant. True to schedule a new OnTime procedure. False to clear a previously set procedure. The default value is True.

  3. #3
    Forum Contributor Cerbera's Avatar
    Join Date
    07-06-2010
    Location
    Rotorua, New Zealand
    MS-Off Ver
    Excel 2007, 2013, 2016 & 365
    Posts
    137

    Re: timer for 30 minutes and timer based events

    Sorry browser hung and then it posted twice!
    Last edited by Cerbera; 09-11-2014 at 07:57 PM. Reason: Duplicate

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Label as Progress Based On Timer
    By iqballud in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-19-2014, 02:48 PM
  2. Help with timer events
    By EXLent in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-08-2014, 09:19 AM
  3. Replies: 1
    Last Post: 12-12-2012, 08:46 PM
  4. Cell Color formatting based on timer
    By sjmilleroh in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-03-2012, 05:30 PM
  5. Replies: 1
    Last Post: 03-10-2006, 08:10 AM

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