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
|