- Public Function Recherche(Texte As String, Expression_debut As String, Expression_fin As String) As String
- Dim Variable, Valeur
- Valeur = Split(Texte, Expression_debut)
- Variable = Split(Valeur(1), Expression_fin)
- Recherche = Variable(0)
- End Function
-
- 'EXEMPLE
- 'pour appeler la fonction
-
- Private Sub Form_Load()
- Dim ligne As String
- ligne = "[test=toto]"
- Form1.Caption = Recherche(ligne, "[test=", "]")
- End Sub
Public Function Recherche(Texte As String, Expression_debut As String, Expression_fin As String) As String
Dim Variable, Valeur
Valeur = Split(Texte, Expression_debut)
Variable = Split(Valeur(1), Expression_fin)
Recherche = Variable(0)
End Function
'EXEMPLE
'pour appeler la fonction
Private Sub Form_Load()
Dim ligne As String
ligne = "[test=toto]"
Form1.Caption = Recherche(ligne, "[test=", "]")
End Sub