bonjour,
j'ai récupérer sur internet le petit code suivant
Sub Macro2()
'
Dim lastlig As Long
Dim s As Byte
For s = 4 To ThisWorkbook.Worksheets.Count
With Sheets(s)
lastlig = .Cells(Rows.Count, 1).End(xlUp).Row
.Range("A2:I" & lastlig).Copy Sheets(1).Cells(Rows.Count, 1).End(xlUp)(2)
End With
Next s
End Sub
il fonctionne bien mais ne prend pas en charge les deux premiers onglets. Pourquoi?
merci par avance de votre aide.
j'ai récupérer sur internet le petit code suivant
Sub Macro2()
'
Dim lastlig As Long
Dim s As Byte
For s = 4 To ThisWorkbook.Worksheets.Count
With Sheets(s)
lastlig = .Cells(Rows.Count, 1).End(xlUp).Row
.Range("A2:I" & lastlig).Copy Sheets(1).Cells(Rows.Count, 1).End(xlUp)(2)
End With
Next s
End Sub
il fonctionne bien mais ne prend pas en charge les deux premiers onglets. Pourquoi?
merci par avance de votre aide.