by cooldad » Tue Nov 25, 2008 12:51 pm
Using Excel, I like to go through all the markets from a quick pick list. To load the quick pick list, I put value -3 in cell Q2, then I want to loop over all events by putting value -1 in cell Q2.
In BA, I have enabled triggered betting.
I am using VBA to set the value in Q2. When I use the debugger, it works fine, however when I run the macro it doesn´t work. It looks like the value in Q2 disappears too quickly to be picked up by BA.
I tried to add Application.Wait but that doesn´t help either, as VBA is single-threaded.
I got it sort of working using VBA trigger (Application.OnTime (Now + TimeValue("00:00:01")), "UserDefinedFunction"), but this leads to infinite recursion as the user defined function call itself repeatedly.
Does anyone know a better way to implement this?
Thanks!