Tu pourait toujour recommencer exactement pareil mais cela serait plus long ! Autre sollution :
If ligne <> " Standard & Poor's - R\'e9sultat de la recherche Consistance Long Terme" Then If ligne <> "Ton deusiemme if" then Texte = Texte & ligne & vbCrLf End If end if
|
ainsi tu peut faire autant de if que tu veut !
-------------------------------
Réponse au message :
-------------------------------
re hello
j'ai ce ki suit:en fait maintenant je veux savoir comment fait-on pour revenir au début du fichier pour faire un autre if avec une autre chaîne de caractères.Merci les amis.:)
Private Sub Command14_Click()
Dim FF As Long
Dim Texte As String, ligne As String
FF = FreeFile
Open App.Path & "\sp4.txt" For Input As #FF
Do Until EOF(FF)
Line Input #FF, ligne
If ligne <> " Standard & Poor's - R\'e9sultat de la recherche Consistance Long Terme" Then
Texte = Texte & ligne & vbCrLf
End If
Loop
Close #FF
Kill App.Path & "\sp4.txt"
FF = FreeFile
Open App.Path & "\sp4.txt" For Binary As #FF
Put #FF, 1, Texte
Close #FF
End Sub