+ Reply to Thread
Results 1 to 4 of 4

on time procedure

  1. #1
    Registered User
    Join Date
    07-07-2006
    Posts
    26

    on time procedure

    Hi

    I need to run a macro every minute in a spreadsheet.

    I have tried using

    Application.OnTime Now + TimeValue("00:00:59"), "updatespreads"

    But it is not working. Any ideas? Does it need to be in a module, or sheet?

    Dan

  2. #2
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile

    Good afternoon Nike6106

    The code you supplied will run the macro "updatespreads" in 59 seconds time - just running it once. If you want to keep on running it, you'll need to call it again from teh "updatespreads" macro, thus :
    Please Login or Register  to view this content.
    HTH

    DominicB
    Please familiarise yourself with the rules before posting. You can find them here.

  3. #3
    Registered User
    Join Date
    04-02-2007
    Posts
    35
    DominicB

    would it be useful it include the

    DoEvents line so that it frees up for other actions during the 59 seconds?

  4. #4
    Registered User
    Join Date
    07-07-2006
    Posts
    26
    that worked. thanks

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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