title: Openning a Modeless Form at runtime - VBA Excel
body: <p>I'll try to explain the situation:</p>
  
  <p>I have a form, which is generated and designed programmatically.</p>
  
  <p>So, I have an object instanced with this form: object "<em>NewForm</em>"</p>
  
  <p>At some point, I need to show this form. So I have to add the object NewForm as a form:</p>
  
  <pre><code>VBA.UserForms.Add (NewForm.Name)
  </code></pre>
  
  <p>And then show the form, </p>
  
  <pre><code>UserForms(0).Hide
  UserForms(0).Show
  </code></pre>
  
  <p>The problem is that I need to show a modeless form, so normally a simple</p>
  
  <pre><code>UserForms(0).Hide
  UserForms(0).Show vbModeless
  </code></pre>
  
  <p>would be enought. However, when I use this last line of code, the form shows up and suddenly disappears.</p>
  
  <p>I've also tried to set the property <em>ShowModal</em> as False, but I have the same result.</p>
  
  <p>Thank you in advance,</p>
  
  <p>Best regards</p>
  
  <p>NOTE: I've tried using <code>NewForm.Name.Show</code>, and it doesn't work, so I have to use the collection instead.</p>