title: Excel does not fully open when starting macro on Workbook_Open
body: <p>I wrote a makro that I want to run directly when the workbook is opened. It works, however, the macro starts before the real spreadsheet opens completely, and I only see the Excel splash the entire time the makro runs.</p>
  <p>I should mention that I open the workbook through the Windows Task Scheduler. Once the file is opened, the macro go through a loop and open a list of other Excel files that are updating external data using the SAP Analysis plugin.</p>
  <p>I call the spreadsheet with the macro as a scheduled task to update data and then close it again automatically:</p>
  <pre><code>Private Sub Workbook_Open()
      If Range(&quot;start_on_open&quot;).value = &quot;YES&quot; Then
          Call Process_action_table
      End If
  End Sub
  </code></pre>
  <p><code>start_open</code> is a named range in my sheet, and when I set it to &quot;YES&quot;, the makro will start automatically.</p>
  <p>While the function &quot;Process_action_table&quot; is running, I display status information in the spreadsheet, but of course with only the splash screen visible, nothing is really displayed.</p>
  <p>When I run the macro &quot;manually&quot;, everything works fine. It seems to me that it is somehow as if there was not enough processing time left to open the spreadsheet properly.</p>
  <p>I have added the following code at the start, but to no avail:</p>
  <pre><code>t_end = Now + TimeValue(&quot;0:0:10&quot;)
  Do While Now &lt; t_end
      DoEvents
  Loop
  </code></pre>
  <p>Any suggestions would be greatly appreciated.</p>