I need to repeat a code every x number of seconds. I found the following link which will help me greatly: http://www.cpearson.com/excel/OnTime.aspx

What I need help with is changing the "120" in the following code to a variable based on the value in a cell

Public RunWhen As Double
Public Const cRunIntervalSeconds = 120 ' two minutes
Public Const cRunWhat = "TheSub"  ' the name of the procedure to run
I have a control sheet with variables so that I can easily change what the script is doing. I want this part of the code to look on the sheet named "Control". Then it basically does a vlookup where it looks in column A for "Update Interval" and then it uses the value in column B. The value in column B is what it uses in place of the "120" in the code above.

Thanks for any help. There are a dozen other things I need this functionality for but once I see it in action for this, I'm sure I'll be able to make it work for everything else I'm doing.