Option Explicit
Sub Zéro_erreur_1004()
Dim n As Long
With Worksheets("Feuil1")
For n = 2 To .Range("B5000").End(xlUp).Row
.Rows(n & ":" & n).Select
Next
End With
End Sub
Sub OO_erreur_1004()
With Sheets("Feuil1")
.Range("A2:IV" & .[B65000].End(xlUp).Row).Select
End With
End Sub
Private Sub toto()
Dim n As Long
For n = 2 To Range("B5000").End(xlUp).Row
With Feuil2
Rows(n).Copy .Rows(.Range("B5000").End(xlUp)(2).Row)
End With
Next n
End Sub
Private Sub CommandButton1_Click()
Range("A2:IV" & [B65000].End(xlUp).Row).Copy Feuil2.[A65000].End(xlUp)(2)
End Sub
essaye ceci :Là le truc de Pierrot fonctionne sauf que la 1ere fois si la ligne est A1 ,ça copie en A2 sur l'autre feuille
Option Explicit
Private Sub toto()
Dim n As Long, i As Long
For n = 2 To Range("B5000").End(xlUp).Row
With Feuil2
With .Range("B5000").End(xlUp)
If .Row = 1 And .Value = "" Then i = 1 Else i = .Row + 1
End With
Rows(n).Copy .Rows(i)
End With
Next n
End Sub
et pourquoi : Rows (n & ":" & n) ne fonctionne pas ??
Rows("" & n & ":" & n & "").Select
Rows(n).Select