<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic VBA MsgBox AFTER Background Query Completion in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/VBA-MsgBox-AFTER-Background-Query-Completion/m-p/3404254#M44148</link>
    <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it possible to create a message box that will show if the refreshing/loading of Queries are completed?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Right now, I'm just looking at the bottom part of my Excel to know if it's still loading. I'd like to know if I can create a message box that will pop up once loading is done.&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Newbie22_1-1693308376852.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/961857i85226A035A8F0317/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Newbie22_1-1693308376852.png" alt="Newbie22_1-1693308376852.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Here's my VBA code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sub RefreshAll()&lt;BR /&gt;'&lt;BR /&gt;' RefreshAll Macro&lt;BR /&gt;'&lt;BR /&gt;' Keyboard Shortcut: Ctrl+Shift+R&lt;BR /&gt;'&lt;BR /&gt;ActiveWorkbook.RefreshAll&lt;BR /&gt;&lt;BR /&gt;End Sub&lt;/P&gt;</description>
    <pubDate>Tue, 29 Aug 2023 11:28:34 GMT</pubDate>
    <dc:creator>Newbie22</dc:creator>
    <dc:date>2023-08-29T11:28:34Z</dc:date>
    <item>
      <title>VBA MsgBox AFTER Background Query Completion</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/VBA-MsgBox-AFTER-Background-Query-Completion/m-p/3404254#M44148</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it possible to create a message box that will show if the refreshing/loading of Queries are completed?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Right now, I'm just looking at the bottom part of my Excel to know if it's still loading. I'd like to know if I can create a message box that will pop up once loading is done.&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Newbie22_1-1693308376852.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/961857i85226A035A8F0317/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Newbie22_1-1693308376852.png" alt="Newbie22_1-1693308376852.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Here's my VBA code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sub RefreshAll()&lt;BR /&gt;'&lt;BR /&gt;' RefreshAll Macro&lt;BR /&gt;'&lt;BR /&gt;' Keyboard Shortcut: Ctrl+Shift+R&lt;BR /&gt;'&lt;BR /&gt;ActiveWorkbook.RefreshAll&lt;BR /&gt;&lt;BR /&gt;End Sub&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2023 11:28:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/VBA-MsgBox-AFTER-Background-Query-Completion/m-p/3404254#M44148</guid>
      <dc:creator>Newbie22</dc:creator>
      <dc:date>2023-08-29T11:28:34Z</dc:date>
    </item>
    <item>
      <title>Re: VBA MsgBox AFTER Background Query Completion</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/VBA-MsgBox-AFTER-Background-Query-Completion/m-p/3404923#M44159</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/431205"&gt;@Newbie22&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;you have 2 options to achieve this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;f you don't want to continue working in Excel while the refresh is ongoing, then you can turn off background refresh for &lt;STRONG&gt;each&lt;/STRONG&gt; query and so the next line of code after RefreshAll(), which could be a MsgBox, will only execute after refresh is done.&lt;BR /&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Martin_D_1-1693326210200.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/962018iA80761F4FA99F618/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Martin_D_1-1693326210200.png" alt="Martin_D_1-1693326210200.png" /&gt;&lt;/span&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;If you want to continue working in Excel while RefreshAll() is executing in the background, then you can implement an AfterRefresh event handler for &lt;STRONG&gt;each&lt;/STRONG&gt; query. Once refresh has finished for all refreshes, e.g. count how many &lt;A href="https://learn.microsoft.com/en-us/office/vba/api/excel.querytable.afterrefresh" target="_self"&gt;AfterRefresh&lt;/A&gt; Events already occured, then finally show the message box. Example see here:&amp;nbsp;&lt;A href="http://www.vbaexpress.com/forum/showthread.php?30743-DoEvents-ActiveWorkbook-RefreshAll-Run-second-part-of-Macro-Once-Complete&amp;amp;s=dedbae73809c7fdb006a4cc805dba9e7&amp;amp;p=206543&amp;amp;viewfull=1#post206543" target="_blank" rel="noopener"&gt;http://www.vbaexpress.com/forum/showthread.php?30743-DoEvents-ActiveWorkbook-RefreshAll-Run-second-part-of-Macro-Once-Complete&amp;amp;s=dedbae73809c7fdb006a4cc805dba9e7&amp;amp;p=206543&amp;amp;viewfull=1#post206543&lt;/A&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;&lt;P class="lia-align-right"&gt;&lt;A title="GitHub" href="https://github.com/MartinBubenheimer" target="_blank" rel="noopener"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-right" image-alt="github.png" style="width: 34px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/933704i8348AD2A9C7A3ED4/image-dimensions/34x34?v=v2" width="34" height="34" role="button" title="github.png" alt="github.png" /&gt;&lt;/span&gt;&lt;/A&gt;&lt;A title="linkedin" href="https://www.linkedin.com/in/martin-bubenheimer-9ba99271/" target="_blank" rel="noopener"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-right" image-alt="linkedin.png" style="width: 36px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/933703i7ADBF83A4A253887/image-dimensions/36x31?v=v2" width="36" height="31" role="button" title="linkedin.png" alt="linkedin.png" /&gt;&lt;/span&gt;&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2023 16:30:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/VBA-MsgBox-AFTER-Background-Query-Completion/m-p/3404923#M44159</guid>
      <dc:creator>Martin_D</dc:creator>
      <dc:date>2023-08-29T16:30:48Z</dc:date>
    </item>
  </channel>
</rss>

