VBA: Waiting for Bloomberg BDP calls to finish

北慕城南 提交于 2019-11-29 04:55:57

I built something similar using BDH. I had to release control so that the Bloomberg add-in can go and collect the data, then resume my code. I was able to do this using Application.OnTime.

For example, if you have a 'CheckForData' function that affects the =BDP calls, and another function called 'ProcessData' that checks the results, make an aynchronous call to to 'ProcessData' within 'CheckForData', e.g.

Sub CheckForData
  ' Your code here
  Application.OnTime Now + TimeValue("00:00:05"), "ProcessData"
End Sub

Then within 'ProcessData' perform your checks.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!