Bonsoir MPETIT, ric, le forum,
Une autre façon de procéder....
Option Explicit
Dim X As Integer, dl As Integer, i As Integer
Dim nbcol As Integer
Dim f As Worksheet, rng As Range, tblbd
Private Sub UserForm_Initialize()
Set f = Sheets("Feuil1")
Set rng = f.Range("A1:D" & Range("A" & Rows.Count).End(xlUp).Row)
nbcol = rng.Columns.Count
Me.ListBox1.ColumnCount = nbcol
Me.ListBox1.ColumnWidths = "70;70;50;50"
tblbd = rng.Value
For i = 1 To UBound(tblbd): tblbd(i, 4) = Format(tblbd(i, 4), "0.00 €"): Next i
Me.ListBox1.List = tblbd
ListBox1.Selected(0) = True
End Sub
Private Sub CommandButton1_Click()
Application.ScreenUpdating = False
With Sheets("Feuil2")
.Activate
.Range("A1").CurrentRegion.ClearContents
dl = .Range("A" & Rows.Count).End(xlUp).Row + 1
For X = 1 To Me.ListBox1.ListCount
.Range("A1:C1").Font.Bold = True
.Cells(X, 1) = Me.ListBox1.List(X - 1, 1)
.Cells(X, 2) = Me.ListBox1.List(X - 1, 2)
.Cells(X, 3) = Me.ListBox1.List(X - 1, 3)
Next X
End With
Unload Me
End Sub
Bonne soirée,