title: Excel/VBA - How do I use BloombergUI .Subscribe to pull BDS?
body: <p>I am running into a problem where Bloomberg formulas do not load while the VBA is running. I would like to use the BloombergUI to resolve it.</p>
  
  <p>Colin Legg's response <a href="https://www.mrexcel.com/forum/excel-questions/414626-bloomberg-links-macros.html" rel="nofollow noreferrer">here</a> works for pulling BDP data, but I cannot get it to work for BDS formulas. Does anybody know how to modify the code? </p>
  
  <pre><code>Dim xlCalc As XlCalculation Sub Test1()
      'early bound - reference to Bloomberg
  
      'save the calculation setting and then set to automatic
      xlCalc = Application.Calculation
      Application.Calculation = xlCalculationAutomatic
  
      Sheet1.Range("C2:H4").Formula = "=BDP($B2,C$1)"
      BloombergUI.RefreshAllStaticData
      Application.OnTime Now + TimeValue("00:00:02"), "HardCode" End Sub   Sub HardCode()
      Sheet1.Range("C2:H4").Value = Sheet1.Range("C2:H4").Value
      Application.Calculation = xlCalc End Sub
  </code></pre>