Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
Private Function ex(titi, a, b, c As ListBox)
c.Clear
Do While InStr(titi, a) > 0
    titi = Mid(titi, InStr(titi, a) + Len(a))
    If InStr(titi, b) = 0 Then
    Exit Do
    Else
    c.AddItem re(titi, a, b)
    titi = Mid(titi, InStr(titi, b) + Len(b))
    End If
Loop
End Function
Private Function re(x, a, b)
b1 = Mid(x, InStr(x, a) + Len(a))
re = Left(b1, InStr(b1, b) + Len(b))
End Function
 
Private Function exREV(titi, a, b, c As ListBox)
c.Clear
Do While InStr(titi, a) > 0
    titi = Mid(titi, InStr(titi, a) + Len(a))
    If InStr(titi, b) = 0 Then
    Exit Do
    Else
    c.AddItem reREV(titi, a, b)
    titi = Mid(titi, InStr(titi, b) + Len(b))
    End If
Loop
End Function
Private Function reREV(x, a, b)
b1 = Left(x, InStr(x, b) + Len(b))
reREV = Mid(b1, InStrRev(b1, a) + Len(a))
End Function
rechercher un text entre de et a en commancent la recherche par de
a.Text = re(ch.Text, de,a)

rechercher un text entre de et a en commancent la recherche par a
a.Text = reREV(ch.Text,de,a)

rechercher tous les text entre de et a en commancent la recherche par de
a = ex(ch.Text, de,a,list1)

rechercher tous les text entre de et a en commancent la recherche par a
a = exREV(ch.Text, de,a,list1)