Para conminar al usuario a seleccionar únicamente los elementos que pertenezcan a la lista debes configurar la propiedad
Style a 'DropDownList'.
Para lo que te sea útil, puedes validar el texto ingresado en el evento Validate del control ComboBox
Private Sub ComboBox1_Validate(Cancel As Boolean)
If Trim(ComboBox1.Text) <> "" Then
Dim ExisteValor As Boolean
Dim Index As Integer
ExisteValor = False
For Index = 1 To ComboBox1.ListCount
If UCase(ComboBox1.List(Index)) = UCase(Trim(ComboBox1.Text)) Then
ExisteValor = True
Exit For
End If
Next
If ExisteValor = False Then
MsgBox ("El valor ingresado no existe en la lista")
End If
Cancel = Not ExisteValor
End If
End Sub
Nuestra profesión exige tener pasión por resolver problemas de una manera óptima y eficiente.