soleildz
Messages postés58Date d'inscriptiondimanche 19 avril 2009StatutMembreDernière intervention10 février 2016
-
30 août 2004 à 15:41
cs_dragon
Messages postés2336Date d'inscriptionsamedi 14 juillet 2001StatutMembreDernière intervention 5 mai 2009
-
30 août 2004 à 17:05
salut à tous,
voici une partie de mon module qui fonctionne ( bien ?)
je constate que lorsque la boucle i depasse 30 ,le programme
ne fonctionne pas comme je veux!!!
jusqu'à i=30 pas de probleme :audela de i=30 c'est l loterie
Pourquoi ce probleme ?
je ne suis pas fort en programmation...
Public Function FiltresD11(ByVal comb As String, ListesD As ListBox, Listesl As ListBox) As Boolean
Dim i As Long, noccur As Byte, comb1 As String, ws1 As String, j1 As Long, b10 As Long, b As Long, pose As Long
Dim tabl() As Long, tabl1() As Long, g As Integer, comb2 As String, Item(25) As Long, cope() As String, n3 As Long
Dim tab_comb() As String, k As Long, q As Long, j5 As Long, j2 As Long, j3 As Long, maliste As String, sci() As String, scie() As String, i10 As Integer, j0 As Integer, k0 As Long, j As Long, malist() As String, coop(2000) As String
On Error GoTo Filtre_Err
If tiercés = "1" Then
FiltresD11 = True
GoTo 10:
End If
ReDim Preserve tb(200000)
ReDim Preserve tb1(200000)
ReDim Preserve tb2(200000)
ReDim Preserve tb3(200000)
n4 = 0
k100 = k100 + 1
If k100 > 1 Then
FiltresD11 = True
GoTo 10:
End If
If textl1 = 0 Then
FiltresD11 = True
GoTo 10
End If
comb = Listesl.List(0)
tb(0) = comb
l = ListesD.ListCount
For i = 0 To l - 1
tabl1 = ListToArray(ListesD.List(i))
asItem() = Split(ListesD.List(i), "/")
For j0 = 0 To UBound(cope) - 1
If cope(j0) scie(0) Or cope(j0) scie(1) Or cope(j0) = scie(2) Or cope(j0) = scie(3) Then GoTo 50
maliste = maliste & cope(j0) & "/"
50 Next j0
If textl2 = 1 Then
i10 = i10 + 1
tb(i10) = maliste
tb1(i10) = maliste
End If
If tb(j2) <> "" Then
j3 = j3 + 1
tb3(j3) = tb(j2)
End If
Next j2
n4 = j3
For j1 = 1 To n4
tb(j1) = tb3(j1)
Next j1
' End If
End If
90 If n4 4 And k10 0 Then GoTo 100 If i10 1 And k10 0 Then GoTo 100 If n4 0 And k10 0 Then GoTo 100
If q = 1 Then GoTo 100
95 Next k10
100 Next g
Next i
250 With MDIPari.ActiveForm
For j = 1 To i10
If tb1(j) = "" Then GoTo 110
sci() = Split(tb1(j), "/")
A0 = UBound(sci)
For k10 = 0 To UBound(sci) - 1
Atrier(k10 + 1) = sci(k10)
Next k10
Call TRISHELL(A0)
b10 = b10 + 1
tb2(b10) = vecteur
110 Next j
For j = 1 To b10
If j = 1 Then GoTo 120
For k10 = 1 To j - 1
If tb2(k10) = tb2(j) Then GoTo 130
Next k10
comb = tb2(j)
sci() = Split(tb2(j), "/")
' If UBound(sci) = 3 Then GoTo 120
' If UBound(sci) >= 6 Then GoTo 130
' If FiltresA(tb2(j), .List(0), .List(3)) = True Then
If FiltresC(tb2(j), .List(2)) = True Then
j5 = j5 + 1
.TxtNbComb(5).Text = j5
120 .ListR(1).AddItem tb2(j)
End If
' End If
130 Next j
End With
frmDocument.text_l1.Text = 0
frmDocument.text_l2.Text = 0
Exit Function
Filtre_Err:
Call ErrorHandler(Err.Number)
10 End Function
cs_dragon
Messages postés2336Date d'inscriptionsamedi 14 juillet 2001StatutMembreDernière intervention 5 mai 20096 30 août 2004 à 16:18
chit c'est du tableau
ReDim Preserve tb(200000)
ReDim Preserve tb1(200000)
ReDim Preserve tb2(200000)
ReDim Preserve tb3(200000)
ça te donne quoi comme erreur dépassement de la capacité de la pile ???
Ça donne tu réellement dequoi de redimentionner a chaque fois quand les valeurs sont fixe ???
bonjour les goto aussi, essai de mettre des if à la place, ça fais beaucoup plus propre que des dizaine de goto
-------------------------------------------------
Dragon alias aussi Waxime mais bon, pas le gout de refaire un nouveau profil lol
-------------------------------------------------
cs_dragon
Messages postés2336Date d'inscriptionsamedi 14 juillet 2001StatutMembreDernière intervention 5 mai 20096 30 août 2004 à 17:05
il me semble qu'il y a un bonjour de trop dasn mon premier post lol, vive le copier coller lol
-------------------------------------------------
Dragon alias aussi Waxime mais bon, pas le gout de refaire un nouveau profil lol
-------------------------------------------------