title: Keep excel table formatting after refreshing the table
body: <p>I have VBA code that refreshes an Excel table using a sproc</p>
  
  <pre><code>With ActiveWorkbook.Connections("Connection").OLEDBConnection
  Values = QueryStr 
  .CommandText = Values
  End With
  </code></pre>
  
  <p>Once the refresh has completed I need to apply some formatting (trhough VBA code), the problem with this is that the code executes without waiting for the refresh to end, therefore the  VBA macro fails, is there a way I could tell the macro to wait until the refresh has completed?</p>
  
  <p>Thanks</p>