How can I delay a bet firing into a market when there has been a suspension?
I would like a delay of around 20sec to allow the market to settle before my bet can be fired.
Thanks
How to delay a bet firing?
The following will delay showing a message box for ten seconds:
If Application.Wait(Now + TimeValue("0:00:10")) Then
MsgBox "10 seconds has elapsed. OK to trade"
End If
Put the above in the worksheet calculate event, then enter something that causes excel to do a calculation, such as "=2" in a cell.
You'll need to adapt it to suit, such as "if range("##")="Suspended" and "time now is less than off time", then...Application.Wait(Now + TimeValue("0:00:10"))
Hope this helps
Nigel.
If Application.Wait(Now + TimeValue("0:00:10")) Then
MsgBox "10 seconds has elapsed. OK to trade"
End If
Put the above in the worksheet calculate event, then enter something that causes excel to do a calculation, such as "=2" in a cell.
You'll need to adapt it to suit, such as "if range("##")="Suspended" and "time now is less than off time", then...Application.Wait(Now + TimeValue("0:00:10"))
Hope this helps
Nigel.