I am copying formulas into a worksheet to get Bloomberg data, but the data is not refreshing. You have to click on each cell to see the data from Bloomberg. Any ideas will be helpful.
'Imports Formulas from Sheet3
Set r = Sheet1.Range("A8")
k = Sheet1.Range("A50000").End(xlUp).Row
mc = Sheet1.UsedRange.Columns.Count
Set srange = Sheet3.Range("A6")
On Error GoTo errHandler
While srange.Column <= mc
If Left(srange.Formula, 1) = "=" Then
srange.Copy
r.Resize(k - 5, 1).PasteSpecial xlPasteFormulas
r.Resize(k - 5, 1).PasteSpecial xlPasteFormats
End If
Set r = r.Offset(0, 1)
Set srange = srange.Offset(0, 1)
Wend
Sheet1.Calculate
Application.Calculation = xlCalculationAutomatic
BloombergUI.RefreshAllStaticData
'Imports Formulas from Sheet3
Set r = Sheet1.Range("A8")
k = Sheet1.Range("A50000").End(xlUp).Row
mc = Sheet1.UsedRange.Columns.Count
Set srange = Sheet3.Range("A6")
On Error GoTo errHandler
While srange.Column <= mc
If Left(srange.Formula, 1) = "=" Then
srange.Copy
r.Resize(k - 5, 1).PasteSpecial xlPasteFormulas
r.Resize(k - 5, 1).PasteSpecial xlPasteFormats
End If
Set r = r.Offset(0, 1)
Set srange = srange.Offset(0, 1)
Wend
Sheet1.Calculate
Application.Calculation = xlCalculationAutomatic
BloombergUI.RefreshAllStaticData