soleildz
Messages postés58Date d'inscriptiondimanche 19 avril 2009StatutMembreDernière intervention10 février 2016
-
31 juil. 2003 à 12:35
nhervagault
Messages postés6063Date d'inscriptiondimanche 13 avril 2003StatutMembreDernière intervention15 juillet 2011
-
31 juil. 2003 à 14:30
peux tu m'aider?merci d'avance.
voila une partie d'un module.
Public Function FiltresD(ByVal Comb As String, ListesD As ListBox, N As Long) As Boolean
Dim i As Long, l As Long, noccur As Byte
Dim tabl() As Long, ws As String
On Error GoTo Filtre_Err
l = ListesD.ListCount
FiltresD = True
Combi = ListToArray(Comb).....ici
compteur = 0
For i = 0 To l - 1
tabl = ListToArray(ListesD.List(i))............ici
noccur = NbreOccurence(tabl, Combi).....ici
If noccur = UBound(Combi) Then.........ici
compteur = compteur + 1
End If
Next i
If s = 2 Then
If compteur <> N Then
FiltresD = False
End If
End If
If s = 1 Then
If compteur < N Then
FiltresD = False
End If
End If
If s = 3 Then
If compteur > N Then
FiltresD = False
End If
End If
If s > 3 Then
If compteur > N Or compteur < 1 Then
FiltresD = False
End If
End If
Exit Function
Filtre_Err:
Call ErrorHandler(Err.Number)
End Function
comb est de la forme 1/2/3/
ListesD.List(i) contient 8 elements chacune :exemple
1/2/5/7/8/9/11/3 (1)
1/7/9/10/3/15/18/2 (2)
18/2/5/3/1/7/9/4 (3)
.
.
.
je veux par exemple eliminer 1/2/3 ds cet ordre des listes ListesD.List(i) et garder
1/3/2 en (2) et 2/3/1 en (3)