title: Limit selections in a listbox in vb6
body: <p>How can I limit the selection of <strong>ListBox</strong> in <strong>VB6</strong>?<br>
  What I want: <strong><em>User can select maximum 8 Item from ListBox.</em></strong></p>
  
  <p>I am using this code:</p>
  
  <pre><code>Private Sub lstBox1_Click()
       If lstBox1.SelCount &gt; 8 Then
          MsgBox "Maximum 8 items can be selected."             
         'I want here return false
       End if
  End Sub
  </code></pre>