Bonjour,
J'ai un souci sur ce morceau de code il y a une "erreur d’exécution 6 dépassement de capacité".
l'erreur se produit sur la ligne For X = 0 to .ListCount - 1
Private Sub ListBox1_Change()
Dim x As Byte, TheSum As Byte
Dim w As Byte, LaSom As Byte
Dim z As Byte, Som As Byte
With Me.ListBox1
For x = 0 To .ListCount - 1
If .Selected(x) = True Then
TheSum = TheSum + ListBox1.List(x, 1)
End If
Next
End With
Me.TextBox4 = TheSum 'Format(TheSum, "0")
With Me.ListBox1
For z = 0 To .ListCount - 1
If .Selected(z) = True Then
Som = Som + ListBox1.List(z, 2)
End If
Next
Me.TextBox5 = Som 'Format(Som, "0")
End With
End Sub
Merci pour votre aide
Clt
JPH