Hi,
I have inherited some Excel Sheets and Access databases which use the BLP Add-ins to retrive data from Bloomberg.
The Access database is using the Subscribe method - example code below.
'-------------------------
----------
----------
----------
----------
----------
----------
----------
----
Public WithEvents objBloomberg As BLP_DATA_CTRLLib.BlpData
Public Sub MakeDataRequest(Security()
As String, Fields() As String, Optional OverFields As Variant, Optional OverValues As Variant)
' Where Security is an array of Security Numbers,
'Fields is an array of Bloomberg field mnemonics,
'OverFields and OverValues are not used -no idea what they are supposed to do.
Dim nCount As Long
Dim nMaxCount As Long
nMaxCount = UBound(Security, 1)
objBloomberg.AutoRelease = False
For nCount = 0 To nMaxCount
objBloomberg.Subscribe Security(nCount), nCount, Fields, OverFields, OverValues, Monitor:=False
nSendCount = nSendCount + 1
Next nCount
objBloomberg.Flush
End Sub
'data is then received by a sub called DataCallback, and this works ok.
Public Sub DataCallback(nCookie As Long, vtData As Variant)
'-------------------------
----------
----------
----------
----------
----------
----------
----------
----
This all works fine for retreiving current data.
My problem is that I need to be able to retreive data for a different Settlement Date.
In Excel with the BLP function, this is easy as the required date can be passed as part of the field array e.g.
BLP(123456 CORP,[SETTLE_DT=20070720,G
OVT_IDX_RA
TIO])
Is there a way to do something similar with the Access Subscribe function?
Start Free Trial