title: Message box when power query connection refreshes
body: <p>I am hoping someone can help. I have a simple code which will refresh all power query connections. The issue I am having is having a message box pop up when the query has finished.</p>
  <p>Is anyone able to offer any solutions?</p>
  <p>So far I have attempted the following</p>
  <pre><code>Sub RefreshAttempt1()
  
  ActiveWorkbook.RefreshAll
  
  Sheets(&quot;Conc&quot;).Range(&quot;E2&quot;).Value = Format(Now(), &quot;mmm-yy&quot;)
  Sheets(&quot;Conc&quot;).Range(&quot;E5&quot;).Value = Application.UserName
  Sheets(&quot;Conc&quot;).Range(&quot;E3&quot;).Value = Range(&quot;A8&quot;).Value &amp; &quot; 0001/&quot; &amp; Format(Now(), &quot;mm&quot;)
  
  Msgbox = &quot;Your query has now refreshed&quot;
  
  End Sub
  
  Sub RefreshAttempt2()
     
  Application.StatusBar = &quot;DATA REFRESH IN PROGRESS&quot;
  
  ActiveWorkbook.RefreshAll
      
  Application.StatusBar = &quot;DATA REFRESH COMPLETE. REFRESHING ALL VIEWS NOW.&quot;
  
  Application.OnTime Now() + TimeSerial(0, 0, 5), &quot;clearStatusBar&quot;
  
  End Sub
  
  Private Sub clearStatusBar()
      
  Application.StatusBar = False
      
  End Sub
  
  Sub RefreshAttempt3()
  
   Application.StatusBar = &quot;REFRESH IN PROGRESS&quot;
   ActiveWorkbook.RefreshAll
   Application.StatusBar = False
   MsgBox &quot;Refresh Complete   &quot;, , &quot;VivDev&quot;
  
  End Sub
  </code></pre>