+ Reply to Thread
Results 1 to 4 of 4

Simple Real Time Counter Macro to start when prompted

  1. #1
    Forum Contributor
    Join Date
    01-21-2013
    Location
    Aberdeen, Scotland
    MS-Off Ver
    Excel 2007
    Posts
    258

    Simple Real Time Counter Macro to start when prompted

    Good Morning all,

    I was wondering if anyone had a code/any idea how to write a macro for a real time counter.

    The concept is simple - When the user clicks on the tab a Yes/No box will appear 'Would you like to play a game'. and if the user clicks yes, a counter will start incrementing from 1-10000, increasing the cell value by 1 every half second.

    Is this possible? The counter would be in Cell A1

    Kind Regards

    R

  2. #2
    Forum Contributor
    Join Date
    01-18-2013
    Location
    Prague, Czech rep.
    MS-Off Ver
    Excel 2003 - 2016
    Posts
    138

    Re: Simple Real Time Counter Macro to start when prompted

    Hi richtea,

    prehaps you can do infinite loop but that may not be what you´re looking for (u create a loop that runs another macro with a little delay - i´m sure u can use seconds but dunno about half seconds, prolly that would be different syntax that i usualy use and at the end of the macro you run the previous one with the loop...) the problem is, user wont be able do anything whilst that is running and it will run forever - OR if you know you want to run it up to 10K seconds you can make a condition there so the loop stops if the targeted cell has reach your number

    Best regards

    Soul

  3. #3
    Forum Contributor
    Join Date
    01-18-2013
    Location
    Prague, Czech rep.
    MS-Off Ver
    Excel 2003 - 2016
    Posts
    138

    Re: Simple Real Time Counter Macro to start when prompted

    btw. to give you some start up code:

    Please Login or Register  to view this content.
    this adds 1 to A1 every second

  4. #4
    Forum Contributor
    Join Date
    01-21-2013
    Location
    Aberdeen, Scotland
    MS-Off Ver
    Excel 2007
    Posts
    258

    Re: Simple Real Time Counter Macro to start when prompted

    Thanks for the Info SoulPrisoner

    This is what I ended up going for, it wasn't fast enough at one second so I had to find a way to include miliseconds.

    Please Login or Register  to view this content.

+ 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. Trigger Macro on cell change by real time data
    By boesingen in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-04-2013, 04:22 PM
  2. Replies: 3
    Last Post: 03-27-2012, 01:07 PM
  3. macro with vba forms updated by multiple users in real-time
    By juggernautfreak in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-25-2010, 05:51 AM
  4. Start/Stop Time counter
    By SVTF in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-19-2008, 07:38 PM
  5. Real Time Macro
    By McManCSU in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-03-2005, 05:05 PM

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