Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
stuck on the timing refresh....
Guys - trying to get the following subs to run every 10 seconds...i mean -
i'd just like to run sub master_trade every ten seconds but can't figure out how to do it? Sub Master_Trade() Flip_Trade Flip_Bid Flip_Ask STEP1 STEP2 Application.OnTime Now + TimeValue("00:00:10"), "Flip_Trade" Application.OnTime Now + TimeValue("00:00:10"), "Flip_Bid" Application.OnTime Now + TimeValue("00:00:10"), "Flip_Ask" Application.OnTime Now + TimeValue("00:00:10"), "STEP1" Application.OnTime Now + TimeValue("00:00:10"), "STEP2" End Sub |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
stuck on the timing refresh....
Sam,
have a look at this site & see if heps you: http://www.ozgrid.com/Excel/run-macro-on-time.htm -- jb "Sam" wrote: Guys - trying to get the following subs to run every 10 seconds...i mean - i'd just like to run sub master_trade every ten seconds but can't figure out how to do it? Sub Master_Trade() Flip_Trade Flip_Bid Flip_Ask STEP1 STEP2 Application.OnTime Now + TimeValue("00:00:10"), "Flip_Trade" Application.OnTime Now + TimeValue("00:00:10"), "Flip_Bid" Application.OnTime Now + TimeValue("00:00:10"), "Flip_Ask" Application.OnTime Now + TimeValue("00:00:10"), "STEP1" Application.OnTime Now + TimeValue("00:00:10"), "STEP2" End Sub |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
stuck on the timing refresh....
Sam
This goes in a general module Sub Master_Trade() Application.OnTime Now + TimeValue("00:00:10"), "Master_Trade" Flip_Trade Flip_Bid Flip_Ask STEP1 STEP2 End Sub and to kick things off this goes in the workbook_open event Private Sub Workbook_Open() Application.OnTime Now + TimeValue("00:00:10"), "Master_Trade" End Sub Mike "Sam" wrote: Guys - trying to get the following subs to run every 10 seconds...i mean - i'd just like to run sub master_trade every ten seconds but can't figure out how to do it? Sub Master_Trade() Flip_Trade Flip_Bid Flip_Ask STEP1 STEP2 Application.OnTime Now + TimeValue("00:00:10"), "Flip_Trade" Application.OnTime Now + TimeValue("00:00:10"), "Flip_Bid" Application.OnTime Now + TimeValue("00:00:10"), "Flip_Ask" Application.OnTime Now + TimeValue("00:00:10"), "STEP1" Application.OnTime Now + TimeValue("00:00:10"), "STEP2" End Sub |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
stuck on the timing refresh....
Hi Mike, Firstly, thanks.
I have replaced Master Sub with what you have written, and then placed the private sub in the open workbook - but it still doesn't sem to be updating...? "Mike H" wrote: Sam This goes in a general module Sub Master_Trade() Application.OnTime Now + TimeValue("00:00:10"), "Master_Trade" Flip_Trade Flip_Bid Flip_Ask STEP1 STEP2 End Sub and to kick things off this goes in the workbook_open event Private Sub Workbook_Open() Application.OnTime Now + TimeValue("00:00:10"), "Master_Trade" End Sub Mike "Sam" wrote: Guys - trying to get the following subs to run every 10 seconds...i mean - i'd just like to run sub master_trade every ten seconds but can't figure out how to do it? Sub Master_Trade() Flip_Trade Flip_Bid Flip_Ask STEP1 STEP2 Application.OnTime Now + TimeValue("00:00:10"), "Flip_Trade" Application.OnTime Now + TimeValue("00:00:10"), "Flip_Bid" Application.OnTime Now + TimeValue("00:00:10"), "Flip_Ask" Application.OnTime Now + TimeValue("00:00:10"), "STEP1" Application.OnTime Now + TimeValue("00:00:10"), "STEP2" End Sub |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
stuck on the timing refresh....
It's working - got it...Thank you Mike...legend as usual.
"Mike H" wrote: Sam This goes in a general module Sub Master_Trade() Application.OnTime Now + TimeValue("00:00:10"), "Master_Trade" Flip_Trade Flip_Bid Flip_Ask STEP1 STEP2 End Sub and to kick things off this goes in the workbook_open event Private Sub Workbook_Open() Application.OnTime Now + TimeValue("00:00:10"), "Master_Trade" End Sub Mike "Sam" wrote: Guys - trying to get the following subs to run every 10 seconds...i mean - i'd just like to run sub master_trade every ten seconds but can't figure out how to do it? Sub Master_Trade() Flip_Trade Flip_Bid Flip_Ask STEP1 STEP2 Application.OnTime Now + TimeValue("00:00:10"), "Flip_Trade" Application.OnTime Now + TimeValue("00:00:10"), "Flip_Bid" Application.OnTime Now + TimeValue("00:00:10"), "Flip_Ask" Application.OnTime Now + TimeValue("00:00:10"), "STEP1" Application.OnTime Now + TimeValue("00:00:10"), "STEP2" End Sub |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
stuck on the timing refresh....
Sam,
You can demonstrate you code is being called every 10 seconds like this Private Sub Workbook_Open() Application.OnTime Now + TimeValue("00:00:10"), "Master_Trade" End Sub and in a general module Sub Master_Trade() Application.OnTime Now + TimeValue("00:00:10"), "Master_Trade" MsgBox "Hello" 'YOUR CODE End Sub If you run this you will get a message box every 10 seconds. I have no idea what the subs you are calling do but if they aren't working then the fault lies with them and not the routine that calls master_trade every 10 seconds. Mike "Sam" wrote: Hi Mike, Firstly, thanks. I have replaced Master Sub with what you have written, and then placed the private sub in the open workbook - but it still doesn't sem to be updating...? "Mike H" wrote: Sam This goes in a general module Sub Master_Trade() Application.OnTime Now + TimeValue("00:00:10"), "Master_Trade" Flip_Trade Flip_Bid Flip_Ask STEP1 STEP2 End Sub and to kick things off this goes in the workbook_open event Private Sub Workbook_Open() Application.OnTime Now + TimeValue("00:00:10"), "Master_Trade" End Sub Mike "Sam" wrote: Guys - trying to get the following subs to run every 10 seconds...i mean - i'd just like to run sub master_trade every ten seconds but can't figure out how to do it? Sub Master_Trade() Flip_Trade Flip_Bid Flip_Ask STEP1 STEP2 Application.OnTime Now + TimeValue("00:00:10"), "Flip_Trade" Application.OnTime Now + TimeValue("00:00:10"), "Flip_Bid" Application.OnTime Now + TimeValue("00:00:10"), "Flip_Ask" Application.OnTime Now + TimeValue("00:00:10"), "STEP1" Application.OnTime Now + TimeValue("00:00:10"), "STEP2" End Sub |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
stuck on the timing refresh....
Our latest posts crossed, glad I could help and thanks for the feedback.
Mike "Sam" wrote: It's working - got it...Thank you Mike...legend as usual. "Mike H" wrote: Sam This goes in a general module Sub Master_Trade() Application.OnTime Now + TimeValue("00:00:10"), "Master_Trade" Flip_Trade Flip_Bid Flip_Ask STEP1 STEP2 End Sub and to kick things off this goes in the workbook_open event Private Sub Workbook_Open() Application.OnTime Now + TimeValue("00:00:10"), "Master_Trade" End Sub Mike "Sam" wrote: Guys - trying to get the following subs to run every 10 seconds...i mean - i'd just like to run sub master_trade every ten seconds but can't figure out how to do it? Sub Master_Trade() Flip_Trade Flip_Bid Flip_Ask STEP1 STEP2 Application.OnTime Now + TimeValue("00:00:10"), "Flip_Trade" Application.OnTime Now + TimeValue("00:00:10"), "Flip_Bid" Application.OnTime Now + TimeValue("00:00:10"), "Flip_Ask" Application.OnTime Now + TimeValue("00:00:10"), "STEP1" Application.OnTime Now + TimeValue("00:00:10"), "STEP2" End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
add-in timing problem? | Excel Programming | |||
Advancing Timing | Excel Discussion (Misc queries) | |||
Timing of automatic query refresh and macro pivot table refresh | Excel Programming | |||
Timing problem | Excel Programming | |||
VB timing question | Excel Programming |