VBA Bloomberg Link Batch Refresh problem

Syntal

New Member
Joined
May 15, 2014
Messages
1
Hi

I am running some analytics on a long list of stocks.
The idea is to cut out 30 tickers per iteration, run the analytics and copy/paste the results and move on to the next batch.
I have about 600 individual tickers so this process will repeat 20+ times.
However, I am having difficulties allowing BBG to refresh the analytics with the second batch of tickers before copying the results in and moving on...
I tried putting delays/timers but I keep getting the first batch's number pasted in twice..

Can somebody suggest a solution?

Thanks



Sub ComboTest()
Range("N8").Select
Application.Run "'Chart Efficiency Overnight Data.xlsm'!ScreenRefresh"
Sheets("Template").Select
Range("B3").Select
If Worksheets("Template").Range("H3") = "X" Then
Application.Run "ScreenRefresh2"
Else: Application.Run "RefreshAllStaticData"
Application.OnTime Now + TimeValue("00:00:32"), "ScreenRefresh2"
End If

End Sub


Sub ScreenRefresh()


Sheets("Screen").Select
Range("B3:B32").Clear
Sheets("Master List").Select
Range("C3:C32").Select
Selection.Copy
Sheets("Screen").Select
Range("B3").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.Run "RefreshAllStaticData"
Application.OnTime Now + TimeValue("00:00:30"), "CP"
Sheets("Template").Select
Range("B3").Select
End Sub


Sub CP()


Sheets("Screen").Select
Range("B3:H32").Select
Selection.Copy
Sheets("Template").Select
Range("A3").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End Sub


Sub ScreenRefresh2()


Sheets("Screen").Select
Range("B3:B32").Clear
Sheets("Master List").Select
Range("d3:d32").Select
Selection.Copy
Sheets("Screen").Select
Range("B3").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.Run "RefreshAllStaticData"
Application.OnTime Now + TimeValue("00:00:30"), "CPb"
Sheets("Screen").Select
Range("B3").Select
End Sub
 

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