rebonjour,
Quest ce que je peux faire quand mon code vba me dit qu'il y a une erreur de dépassement de capacité au niveaux de la ligne
For i = 2 To DernLigne
voici mon code entièrement
Sub MONTANT_INDEMNITE_PRINCIPALE()
Dim Date_Souscription_Adhésion As Range, Statut_Technique_Sinistre As Range
Dim Montant_Ind_Principale As Range
Dim DernLigne As Long
Dim i As Integer
Dim sa As String
Dim montant As String
Dim tt(2013 To 2017, 1 To 12) As Double
With Worksheets("Sinistre")
DernLigne = .Range("A" & .Rows.Count).End(xlUp).Row
Set Date_Souscription_Adhésion = .Range("G2:G" & DernLigne)
Set Montant_Ind_Principale = .Range("AB2:AB" & DernLigne)
Set Statut_Technique_Sinistre = .Range("V2:V" & DernLigne)
For i = 2 To DernLigne
sa = .Cells(i, 22)
montant = Replace(.Cells(i, 28), ".", ",")
annee = Year(.Cells(i, 7).Value)
Mois = Month(.Cells(i, 7))
If sa <> "Terminé - Refusé après instruction" Then
tt(annee, Mois) = tt(annee, Mois) + CDbl(montant)
End If
Next i
For annee = 2013 To 2017
For Mois = 1 To 12
j = j + 1
' Sheets("Feuil2").Cells(j, 2).Value = tmois(Mois - 1) & " " & annee
Sheets("Feuil1").Cells(j, 6).Value = tt(annee, Mois)
Next Mois
Next annee
End With
End Sub
merciii