+ Reply to Thread
Results 1 to 3 of 3

Ontime Method overloading the call stack.

Hybrid View

  1. #1
    Registered User
    Join Date
    10-06-2006
    Posts
    82

    Ontime Method overloading the call stack.

    Dear Excel Expert.

    I am trying to figure a way to run a procedure every 2 minutes.

    I could call Ontime and have the triggered procedure have another embedded OnTime but won't this overload the Call Stack?

    The result I am after is trying to Refresh an XML datasource every two minutes. If there is another way to do this your input would be much appreciated as well.

    Thank you.

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,887
    Hi ions,

    To do this, you should have two macros. One to start the OnTime event and the other to perform the work.

    The initial macro initiates the first OnTime event, i.e. to occur two minutes from now. In the second macro (the one called by the OnTime event) you could add a Call to the initial macro at the end (e.g. Call my_onTime_event, or Call init_Timer, etc.).

    When OnTime runs for the first time and executes successfully, it is unloaded and should therefore not create any call stack problems (at least none that I've seen).

    Hope that helps!

  3. #3
    Registered User
    Join Date
    10-06-2006
    Posts
    82
    Hmmm.... I would think this would create a stack overflow because the subroutines never reaches the statement end sub.

    Control is never returend to the original subroutine call.
    Last edited by ions; 11-10-2008 at 04:44 PM.

+ 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