Private Sub CommandButton48_Click()
Dim Ligne As Integer, Colonne As Integer
Application.ScreenUpdating = False
ActiveWorkbook.Sheets.Add
With ActiveSheet
For Ligne = 1 To ListView1.ListItems.Count
.Cells(Ligne, 1) = ListView1.ListItems(Ligne).Text
For Colonne = 1 To ListView1.ColumnHeaders.Count - 1
.Cells(Ligne, Colonne + 1) = ListView1.ListItems(Ligne).ListSubItems(Colonne).Text
Next Colonne
Next Ligne
.PageSetup.LeftMargin = Application.InchesToPoints(0.35)
.PageSetup.RightMargin = Application.InchesToPoints(0.35)
.PageSetup.TopMargin = Application.InchesToPoints(0.56)
.PageSetup.BottomMargin = Application.InchesToPoints(0.53)
.PageSetup.HeaderMargin = Application.InchesToPoints(0.32)
.PageSetup.FooterMargin = Application.InchesToPoints(0.39)
.PageSetup.LeftHeader = "Nom: " & TextBoxNom.Value & " Prénom: " & TextBoxPrenom.Value & " Service: " & TextBoxService.Value
.PageSetup.CenterHeader = ""
.PageSetup.RightHeader = ""
.PageSetup.LeftFooter = ""
.PageSetup.CenterFooter = "&D" & " - " & "&T"
.PageSetup.RightFooter = ""
.PageSetup.CenterHorizontally = True
.PageSetup.CenterVertically = True
.Columns.AutoFit
.PageSetup.Orientation = xlLandscape
.PrintOut
Application.DisplayAlerts = False
.Delete
Application.DisplayAlerts = True
End With
Application.ScreenUpdating = True
End Sub