Sub MiseEnPageAutomatique()
Dim F As Worksheet, DLCA&, DC&
For Each F In ThisWorkbook.Worksheets
DLCA = F.Cells(F.Rows.Count, 1).End(xlUp).Row
'Dernière cellule non vide sur la dernière ligne
DC = F.Cells(DLCA, F.Columns.Count).End(xlToLeft).Column
'Définition de la zone d'impression
F.PageSetup.PrintArea = F.Range(F.Cells(1, 1), F.Cells(DLCA, DC)).Address
Next F
End Sub