title: Click event handler on Userform
body: <p>I want to hide a ListBox Object within an Excel UserForm when a click is registered outside of the ListBox object. So I figured I use a Click or MouseUp event on the UserForm, but both do not seem to work. Is there any way I can achive this functionality?</p>
  
  <p>What I have tried so far:</p>
  
  <pre><code>Sub TestUserForm_MouseUp(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)    
       If ListBoxSearch.Visible = True Then    
          ListBoxSearch.Visible = False    
       End If    
  End Sub
  </code></pre>
  
  <p>And:</p>
  
  <pre><code>Sub TestUserForm_Click()    
       If ListBoxSearch.Visible = True Then    
          ListBoxSearch.Visible = False    
       End If    
  End Sub
  </code></pre>
  
  <p>Both events do not fire.</p>