Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Store all the functions in a dictionary object.</p> <p>set a reference to Microsoft Scripting Runtime Library</p> <pre><code>public Sub MasterFunction() Public Dict as Dictionary Set dict = New Dictionary Dict.add "Function1" Dict.add "Function2" Dict.add "Function3" call Function1 call Function2 call Function3 </code></pre> <p>When a function is run...at the end of the function, erase the functions name from the dictionary. ie,</p> <pre><code>public Function Function1() dict.remove "Function1" End Function </code></pre> <p>The last step is to add a loop through the dictionary to see if any items are still remaining. If there are no items in the dictionary then your functions executed successfully. If there are items, then call the function again with application.run "Function1", substituting "Function1" for your function name. Full Example below, Copy and paste into a module and run "MasterFunction". The third function I am not calling to simulate that it did not run. If you step through the code you will see that the only item remaining is Function3 which was not called.</p> <pre><code>Public dict As Dictionary Public Function MasterFunction() Set dict = New Dictionary dict.Add "Function1", "Function1" dict.Add "Function2", "Function2" dict.Add "Function3", "Function2" Call Function1 Call Function2 Dim DictItem For Each DictItem In dict Application.Run DictItem MsgBox DictItem &amp; " has run again because it didn't execute last time" Next Set DictItem = Nothing Set dict = Nothing End Function Function Function1() dict.Remove "Function1" End Function Function Function2() dict.Remove "Function2" End Function Function Function3() dict.Remove "Function3" End Function </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload