bonjour j 'aurais besoin de votre aide concernant l'erreur cite en tittre
voila le code : je vous ai mis en gras ou ca cloche
Dim tTabO, tTabF() As Double
'
With Worksheets("Extract")
iRow = .Range("A" & Rows.Count).End(xlUp).Row
tTabO = .Range("A1").Resize(iRow, 8) " en jaune sur cette ligne ?
End With
'
For x = 1 To UBound(tTabO, 1)
If Left(CStr(tTabO(x, 2)), 4) = "VISA" Then
iIdx = iIdx + 2 ' saut de ligne (2)
ReDim Preserve tTabF(6, iIdx)
tTabF(0, iIdx - 1) = tTabO(x, 2)
For y = x To UBound(tTabO, 1)
If CStr(tTabO(y, 1)) = "TOTALS" Then
tTabF(1, iIdx - 1) = "TOTAL PIECES"
tTabF(2, iIdx - 1) = tTabO(y + 0, 4)
tTabF(3, iIdx - 1) = "LBS KGS"
tTabF(4, iIdx - 1) = tTabO(y + 0, 6)
tTabF(5, iIdx - 1) = tTabO(y - 12, 1)
x = y + 3
Exit For
End If
Next
End If
Next
With Worksheets("Results")
.Cells.ClearContents
.Range("A4").Resize(iIdx, 6) = WorksheetFunction.Transpose(tTabF)
.Columns("A:F").AutoFit
End With
'
End Sub
Merci