Run time error 13 Excel 2010

Bonjour

J'ai un probleme bidon dans une partie de mon long code mais malheureusement je cherche sur le forum si la question n'aurait pas deja ete posee et non

parfois quant je lance l'application le message d'erreur de type (run time error 13) s'affiche, quant j'essaye de débloquer, il affiche cette partie du code

[code][/Private Sub CL_Résultat(Lignes() As Long)

Dim TE(), LE&, TS, LS&, C&, SCA15#, SCA13#, SCA12#, SCA11#

TLgn = Lignes

ReDim TS(1 To UBound(TLgn), 1 To 16)

TE = CL.PlgTablo.Resize(, 16).Value

For LS = 1 To UBound(TLgn)

LE = TLgn(LS)

SCA15 = SCA15 + TE(LE, 3)

SCA13 = SCA13 + TE(LE, 4)

SCA12 = SCA12 + TE(LE, 5)

SCA11 = SCA11 + TE(LE, 6)

For C = 1 To 16: TS(LS, C) = Format(TE(LE, C), "#,##0"): Next C, LS

ListBox1.List = TS

LabInfo.Caption = Format(SCA15, "#,##0 DT")

Label54.Caption = Format(SCA13, "#,##0 DT")

Label55.Caption = Format(SCA12, "#,##0 DT")

Label56.Caption = Format(SCA11, "#,##0 DT")

If UBound(TLgn) <> 1 Then Exit Sub

LCou = TLgn(1)

VLgn = CL.PlgTablo.Resize(, 56).Rows(LCou).Value

btnValider.Caption = "Modifier"

GarnirChamps

End Sub]

la partie coloré en jaune est (: Next C, LS)

merci pour votre aide merci le forum

Bonjour,

A tester.

Cdlt.

Private Sub CL_Résultat(Lignes() As Long)
Dim TE(), LE&, TS, LS&, C&, SCA15#, SCA13#, SCA12#, SCA11#

    Tlgn = Lignes
    ReDim TS(1 To UBound(Tlgn), 1 To 16)
    TE = CL.PlgTablo.Resize(, 16).Value

    For LS = 1 To UBound(Tlgn)
        LE = Tlgn(LS)
        SCA15 = SCA15 + TE(LE, 3)
        SCA13 = SCA13 + TE(LE, 4)
        SCA12 = SCA12 + TE(LE, 5)
        SCA11 = SCA11 + TE(LE, 6)
        For C = 1 To 16
            TS(LS, C) = Format(TE(LE, C), "#,##0")
        Next C
    Next LS

    ListBox1.List = TS
    LabInfo.Caption = Format(SCA15, "#,##0 DT")
    Label54.Caption = Format(SCA13, "#,##0 DT")
    Label55.Caption = Format(SCA12, "#,##0 DT")
    Label56.Caption = Format(SCA11, "#,##0 DT")

    If UBound(Tlgn) <> 1 Then Exit Sub

    LCou = Tlgn(1)
    VLgn = CL.PlgTablo.Resize(, 56).Rows(LCou).Value
    btnValider.Caption = "Modifier"

    GarnirChamps

End Sub
Rechercher des sujets similaires à "run time error 2010"