VBA Code with Bloomberg

rki1966

Active Member
Joined
Feb 1, 2004
Messages
351
I have an excel spreadsheet that has a bloomberg blph function. The fuction returns a volume for a period. I can get the bloomberg query to work but the macro has a loop for each security. The symbol will change during the loop but the bloomberg query will not update the data.

I have put in a wait, but it still does not help. The symbol will change every 5 seconds but the query will not update. After each update I want to copy the average volume to another page.

Oh one more thing each symbol has diffenet time periods.
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.

Wolfshead

Board Regular
Joined
Oct 18, 2006
Messages
100
Hi
I had the same problem. The running of a macro appeared to interrupt the calculation of the BLP function. Also I believe a wait suspends all activity anyway, so no process would continue. However I went into Bloomberg help and found that you could call directly on the Bloomberg API. Also in help were a series of downloadable examples which I have adapted to run the code I wanted. I would recommend that you have a look at them - I found that they worked brilliantly.
To find the help:
at a Bloomberg machine type API and press enter (GO)
select "A complete guide to Bloomberg data in Excel"
select WAPI API programming guide.
Hope this helps
Wolfshead
 

Forum statistics

Threads
1,136,586
Messages
5,676,666
Members
419,639
Latest member
ShaunAldridge

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top