title: Excel VBA project crashing after compiling
body: <p>I have a large userform in a project that is causing some issues when it is loaded into memory. There isn't anything exotic happening in the <code>Userform_Initialize</code> event (just populating combo boxes and setting default properties).
  Everything was working just fine a few weeks ago when the userform wasn't as big (measured in KB).  Initially, I thought the workbook was corrupted and proceeded to export every userform, module and class, re-import into a new workbook, and subsequently compiling the project as I've always done.  This did not fix the issue. Interestingly enough, when I put a <code>Stop</code> at the top of the initialize event, and step through the code, everything works fine.</p>
  
  <p><strong>Main Idea</strong></p>
  
  <blockquote>
    <p>This got me thinking that the possible cause of the issue is the fact that the userform is very large, thus the process of loading the userform into memory is taking longer than the typical load. Essentially, the vb editor is continuing to execute the code in the initialize event, attempting to access controls that may not be in memory yet.</p>
  </blockquote>
  
  <p>I have done some crude analysis to get a pretty good idea of just how large the userform in question is.  The userform was exported and re-imported into a blank workbook. The workbook without the userform was around <code>30 KB</code>, and with the userform, the workbook was over <code>350 KB</code>, so we can conclude that the userform is around <code>320 KB</code>.</p>
  
  <p>It is important to note that I have extensive error handling in my project, however, I'm unable to identify this particular error as it is occurring in the initialize event (Error handling is impossible inside this particular event [Bovey, Professional Excel Development, pg 489]).
  <br><br>
  <strong>Question :</strong> With the exception of a time delay (e.g. <code>Application.Wait</code> or <code>Sleep</code> via Windows API), is there another approach to avoid crashing?</p>
  
  <p><br>
  <strong>UPDATE</strong><br>
  It turns out that delaying the application didn't work reliably either.  I have actually removed the entire Initialize event to no avail as well.  One thing that I forgot to mention in my original post, was that I was abusing the <code>Debug --&gt;&gt; Compile VBA Project</code> feature. See my answer below.</p>