Private Sub CommandButton1_Click()
Workbooks.Add
ThisWorkbook.Sheets(1).Activate
With Workbooks(2).Sheets(1)
Set plage1 = Range("a3", "c" & Range("c65536").End(xlUp).Row)
plage1.Copy .Range("a3")
Set suite = .Cells(3, .Range("IV3").End(xlToLeft).Column + 1)
If marques1.Value <> "" Then
Set marques = Range("k3", "k" & Range("c65536").End(xlUp).Row)
marques.Copy suite
Set suite = .Cells(3, .Range("IV3").End(xlToLeft).Column + 1)
End If
If produits1.Value <> "" Then
Set produits = Range("L3", "L" & Range("c65536").End(xlUp).Row)
produits.Copy suite
Set suite = .Cells(3, .Range("IV3").End(xlToLeft).Column + 1)
End If
If quantites1.Value <> "" Then
Set quantites = Range("M3", "M" & Range("c65536").End(xlUp).Row)
quantites.Copy suite
Set suite = .Cells(3, .Range("IV3").End(xlToLeft).Column + 1)
End If
If prix1.Value <> "" Then
Set prix = Range("N3", "N" & Range("c65536").End(xlUp).Row)
prix.Copy suite
Set suite = .Cells(3, .Range("IV3").End(xlToLeft).Column + 1)
End If
If livraison1.Value <> "" Then
Set livraison = Range("O3", "O" & Range("c65536").End(xlUp).Row)
livraison.Copy suite
Set suite = .Cells(3, .Range("IV3").End(xlToLeft).Column + 1)
End If
End With
[B][COLOR="Blue"]If ActiveSheet.FilterMode Then ActiveSheet.ShowAllData[/COLOR][/B]
Workbooks(2).Activate
Unload Me
End Sub