Private Sub Command1_Click() Dim aa As Integer nom = "bonjour" On Error GoTo erreur aa = InStr(1, Text1, nom, vbTextCompare) bb = Len(nom) zz = Mid(Text1, aa, bb) MsgBox zz Exit Sub erreur: MsgBox "il n'y a pas:" & nom & " dans ce texte." End Sub
y a plus simple, il faut 2 textbox et 1 boutonPrivate Sub Command1_Click()If InStr(Text1.Text, Text2.Text) Then' chercheMsgBox "le mot " & Text2.Text & " est dans le texte" ' si ouiElseMsgBox " Le mot " & Text2.Text & " n'est pas dans le text" ' si nonEnd IfEnd Sub
tu l'as eu cette fois malin!!!!!!!!!!!!!!!!!
Se souvenir du profil
Mot de passe oublié ? / Activation de compteCréer un compte
1 873 525 membres 53 nouveaux aujourd'hui 16 151 membres club