Bonjour tout le monde,

J'ai un problème dans la lecture de listbox, en particuler dans l'arrêt de cette lecture.
Normalement, je voulais juste lire les données (le programme y parvient), mais il va trop loin dans la lecture. Résultat : il bugge

Je transmets le programme suivant :


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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
Private Sub Validation_Click()
 
Dim i As Single, j As Integer, k As Integer, l As Integer
Dim phicond As Single
Dim s1() As Single, fs1() As Single, s2() As Single, fs2() As Single, orion() As Single
Dim a As Integer, b As Integer
Dim Appdir() As Single
 
ReDim Appdir(1 To m)
 
Sheets("états de l'air").Select
 
For j = 1 To m
 
k = 0
l = 0
phicond = 0
i = -1
While Listparois.List(0, i + 1) <> ""
i = i + 1
    If Listparois.List(2, i) = "T ext" Then
        phicond = phicond + Listparois.List(i, 1) * (Cells(19, j + 1) - Cells(7, j + 1))
    Else
        phicond = phicond + Listparois.List(i, 1) * (Cells(19, j + 1) - Listparois.List(2, i))
    End If
Wend
i = -1
While Listparois.List(i + 1, 0) <> ""
i = i + 1
    If Listparois.List(i, 2) = "T ext" Then
        phicond = phicond + Listlin.List(i, 1) * (Cells(19, j + 1) - Cells(7, j + 1))
    Else
        phicond = phicond + Listlin.List(i, 1) * (Cells(19, j + 1) - Listparois.List(i, 2))
    End If
Wend
i = -1
While Listvitro.List(i + 1, 0) <> ""
i = i + 1
    phicond = phicond + Listvitro.List(i, 2) * (Cells(19, j + 1) - Cells(7, j + 1))
 
    If Listvitro.List(i, 3) <> "" Then
 
        If Listvitro.List(i, 4) = "skydome" Then
            k = k + 1
            ReDim s1(1 To k)
            ReDim fs1(1 To k)
        Else
            l = l + 1
            ReDim s2(1 To l)
            ReDim fs2(1 To l)
            ReDim orion(1 To l)
        End If
 
    End If
 
Wend
 
Cells(57, j + 1) = phicond
 
Next
 
i = -1
While Listvitro.List(i + 1, 0) <> ""
i = i + 1
 
    If Listvitro.List(i, 3) <> "" Then
 
        If Listvitro.List(i, 4) = "skydome" Then
            For a = 1 To k
                s1(a) = Listvitro.List(i, 1)
                fs1(a) = Listvitro.List(i, 3)
            Next
        Else
            For b = 1 To l
                s2(b) = Listvitro.List(i, 1)
                fs2(b) = Listvitro.List(i, 3)
                orion(b) = Listvitro.List(i, 4)
            Next
        End If
 
    End If
 
Wend
 
Call raysolvertdirect(Appdir(), s2(), orion(), fs2(), l)
 
 
 
Unload UserForm2
 
End Sub

Si vous pouvez m'aider, je suis preneur