title: vba excel userform won't show
body: <p>Morning all!</p>
  
  <p>I'm having trouble getting a userfrom to show. </p>
  
  <p>Below is the code I want to use. I declare the Userfrom (oUserform) as a public variable, initialize it and make the changes, then show it.</p>
  
  <p>That's the plan anyway, however I get an error with oUserform.show, saying that the object doesn't support the property or method.</p>
  
  <pre><code>    Public oUserform As UserForm
      Public iNumberOfRecords As Integer
      Public iEndRow As Integer
  
  Sub subIntialize()
  
      Set oUserform = frmbusinessimpact
  
      iEndRow = Sheet1.Cells(1, 1).CurrentRegion.Rows.Count
      iNumberOfRecords = iEndRow - 1
  
      Call subPopulateRecordClass(iEndRow)
  
      With oUserform
          .TotalRecords = iNumberOfRecords
          .CurrentRecord = 1
          Call subUpdateUserform
      End With
  
      oUserform.Show
  
  End Sub
  </code></pre>
  
  <p>Any ideas?</p>