Pete, un exemple:
Private Sub Form_Click ( )
´ Déclare les variables.
Dim Search, Where
´ Obtient la chaîne à rechercher de l´utilisateur.
Search = InputBox("Tapez le texte à rechercher :")
´ Cherche la chaîne dans le texte.
Where = InStr(Text1.Text, Search)
If Where Then ´ S´il la trouve,
Text1.SelStart = Where - 1 ´ définit le début de la
´ sélection
Text1.SelLength = Len(Search) ´ et définit sa longueur.
Else
MsgBox " Chaîne introuvable." ´ Informe l´utilisateur.
End If
End Sub