Click the RefreshWorkbook Button on the Bloomberg Ribbon

Possible duplicate:
How to update / download bloomberg RTD function (BDH) in excel in vba

I am working on an Excel spreadsheet with VBA. I have a Bloomberg BDH function that I want to update from VBA. I tried to record a macro and clicked the Bloomberg-> Refresh Workbooks button, but the macro appeared empty. How can I do this from code? I am using Excel 2007 and I found one input option

Application.Run "blpmain.xla!RefreshAllStaticData"
but blpmain.xla could not be found. I'm not sure which version of Excel / BBG-Addin was for this.

Any help?

+1
source share
3 answers

What I have finished is re-gluing the Bloomberg formulas in their respective ranges. This forced the data to reload. Not the perfect solution, but it works.

+2
source

Basically, unlike BDP ... BDH is not updated because its historical (H), if you want to update it, you need to resubmit the formula.

This may not be the most elegant solution, but what I am doing is changing something in the BDH formula. Thus, you can click on the button that you do, which takes the data and adds the day, and then deletes it. This small change causes it to be updated.

Another thing I used was to have BDH all the historical data, but to have the top column in real time in BDP format so that it is saved.

In the end, the easiest way is to get users to close the excel sheet at the end of the day and reopen it when it needs it.

+1
source

Are you sure you have set a link to addin?

  • Open the code module in the book in which you want to use Add-in Functions
  • Go to Tools> Links to open the Links dialog box, in which you will see a list of all libraries and other objects (for example, Add-Ins) that you can link to.
  • Check the box next to the name and click OK.

References dialog - VBA Project

A source

Once you do this, you can directly access the xla RefreshAllStaticData function.

0
source

Source: https://habr.com/ru/post/927556/


All Articles