Sub Impression()
Dim ZoneImpr As Range, Page As String
On Error Resume Next
Set ZoneImpr = Application.InputBox("Sélectionnez la zone à imprimer", Type:=8)
If ZoneImpr Is Nothing Then
Err.Clear
Exit Sub
End If
On Error GoTo 0
Page = UCase(InputBox("Taille papier ?"))
If Page <> "A4" And Page <> "A5" Then
MsgBox "Erreur de saisie"
Exit Sub
End If
With ActiveSheet.PageSetup
.FitToPagesWide = 1
.FitToPagesTall = 1
If Page = "A4" Then
.PaperSize = xlPaperA4
Else
.PaperSize = xlPaperA5
End If
End With
Selection.PrintOut
End Sub