title: How can I check whether the data already exists in combobox list?
body: <p>How can I check if the data from <code>cmbTypeYacht.text</code> already exists in <code>cmbTypeYacht.list</code>?</p>
  
  <p>Here's what I've got:</p>
  
  <pre><code>Dim TypeYacht As String 'Type of yacht input
  
  TypeYacht = cmbTypeYacht.Text
  
  If TypeYacht = ("cmbTypeYacht list") Then
      MsgBox "Type of Yacht is already on the list", vbExclamation, "Yacht Chantering"
  Else
      cmbTypeYacht.AddItem cmbTypeYacht.Text
  
      With cmbTypeYacht
          .Text = ""
          .SetFocus
      End With
  End If
  </code></pre>
  
  <p>sorry about the tag im not quite sure which is it but im using Microsoft Visual Basic app.</p>