salut,je veut rechercher etudiants dans un fichier selon un critere (combobox):non\sexe , d autre part on a textbox qui prend la valeur du critere puis afficher la resultat dans un textbox
Option Explicit ' form1 + combo1 + text1 Sub Form_Load() Dim i As Long Dim cherche As String cherche = "nom homme" Text1 = "" For i = 0 To Combo1.ListCount - 1 If Combo1.List(i) = cherche Then Text1 = Combo1.List(i) Exit For End If Next i If Text1 = "" Then MsgBox "Non trouvé", vbExclamation End Sub