Interrogate Bloomberg database via VBA code

mikeymay

Well-known Member
Joined
Jan 17, 2006
Messages
1,600
Office Version
  1. 365
Platform
  1. Windows
I am using some '=BDP......' formulas to interrogate the Bloomberg database to return ticker data.

When the formulae are used manually, the relevant cells are populate with the queried data but when used via a VBA procedure, the caluclation/interrogation hangs and only updates once the code has fully executed and exited.

As I am looping through multiple tickers, I need to store the data retrieved from each ticker to create my own mini database of the ticker data retrieved so it can be used in a dynamic ticker driven dashboard.
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Hi - forgive me, but what is the question?

If you're looking for thoughts about the delayed updating of queried data, my first (and thus far only) thought is that it sounds like the code you're using is set to manual and not automatic. Whereas when you enter the formula in a worksheet (and the data is populated then-and-there), it is not necessarily the case that the same will be the same with VBA. People usually turn off ScreenUpdating (Application.ScreenUpdating = False) and change the calculation method to manual (Application.Calculation = xlCalculationManual), which has the combined effect of making it look like the system is 'hanging' and is only ever updated at the end of the routine, when these settings are changed back.

Is that something that might have happened in your VBA?
 
Upvote 0

Forum statistics

Threads
1,215,029
Messages
6,122,760
Members
449,095
Latest member
m_smith_solihull

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
Back
Top