Posts

Showing posts with the label bloomberg

For loop in VBA when refreshing Bloomberg requests

For loop in VBA when refreshing Bloomberg requests I am putting together an excel workbook that performs various calculations based on a number of Bloomberg fields. For a particular date, it checks various requirements and then outputs either a 1 or -1 in a row based on if the requirements are met or not. I have got this working with a macro. The issue is I need to run the checks through a number of dates. So each loop I need the input date to be changed, the Bloomberg data needs to refresh and then either put a 1 or -1 in the next row down based on if requirements are met for this date. The problem is I can not get the loop to work correctly. Below is a simplified version of my code: Public i As Integer Public Sub RefreshStaticLinks() Call Worksheets("Sheet2").Range("A5:H7").Select Call Application.Run("RefreshCurrentSelection") Call Application.OnTime(Now + TimeValue("00:00:10"), "ProcessData") End Sub Private Sub ProcessD...