title: Excel VBA: Compile Error: Method or data member not found
body: <p>EDIT: To clarify, the code seen below is within a module and the UserForm is all contained within its own code.</p>
  
  <p>I have the following code. When I go to run it, Excel throws me a compile error: <code>Method or data member not found</code> and highlights the following piece of code: <code>.showInputsDialog</code>. I have no idea how to resolve this error.</p>
  
  <p>To give more information, the sub <code>sportUserForm</code> is supposed to call up a UserForm <code>sportsUsrFrm</code>. Any help with this issue is greatly appreciated.</p>
  
  <pre><code>Option Explicit
  
  Sub sportUserForm()
  
  Dim sSport As String, sPreference As String
  
  If sportsUsrFrm.showInputsDialog(sSport, sPreference) Then
      MsgBox "Your favorite sport is " &amp; sSport &amp; ", and you usually " _
              &amp; sPreference &amp; "."
          Else
      MsgBox "Sorry you don't want to play."
  End If
  End Sub
  
  Public Function showInputsDialog(sSports As String, sPreference As String) As Boolean
  Call Initialize
  Me.Show
  If Not cancel Then
      If optBaseball.Value Then sSport = "Baseball"
          ElseIf optBasketball.Value Then sSport = "Basketball"
          Elss sSport = "Football"
      End If
  
      If optTV.Value Then sPreference = "watch on TV" _
          Else: sPreference = "go to games"
      End If
  
      showInputsDialog = Not cancel
      Unload Me
  End Function
  </code></pre>
  
  <p>UserForm code for <code>sportUsrFrm</code></p>
  
  <pre><code>Option Explicit
  
  Private Sub cmdCnl_Click()
      Me.Hide
      cancel = True
  End Sub
  
  Private Sub cmdOK_Click()
  
      If Valid Then Me.Hide
      cancel = False
  End Sub
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/rl0Sp.png" rel="nofollow"><img src="https://i.stack.imgur.com/rl0Sp.png" alt="UserForm image"></a></p>