Impression page orientation paysage ajuster à 1 page

Bonjour à tous ,

Je reviens un peu vous embêter

Voila je souhaiterais imprimer les pages sélectionnées en mode paysage avec un ajustement à 1 page.

J'ai tapé ce code :

Private Sub CommandButton1_Click()

If CheckBox1.Value = True Then

Worksheets("Tableau comparatif").PageSetup.Orientation = xlLandscape

Application.Dialogs(Excel.XlBuiltInDialog.xlDialogPrinterSetup).Show

Sheets("Tableau comparatif").PrintOut

If CheckBox2.Value = True Then

Worksheets("Tableau IJSS").PageSetup.Orientation = xlLandscape

Application.Dialogs(Excel.XlBuiltInDialog.xlDialogPrinterSetup).Show

Sheets("Tableau IJSS").PrintOut

Unload Me

End If

End If

End Sub

Private Sub CommandButton2_Click()

Unload Me

End Sub

Tout fonctionne sauf le mode paysage et je ne sais pas comment rentrer le code " ajuster à une page"

Merci déja de vos réponses

Le problème à été résolu.

Merci quand même, je met le code si quelqu'un en a besoin

Private Sub CommandButton1_Click()

    If CheckBox1.Value = True Then

    Sheets("Tableau comparatif").PageSetup.Orientation = xlLandscape

    Application.Dialogs(Excel.XlBuiltInDialog.xlDialogPrinterSetup).Show

    Sheets("Tableau comparatif").PrintOut

    With Worksheets("Tableau comparatif").PageSetup
    .Zoom = False
    .FitToPagesTall = 1
    .FitToPagesWide = 1
End With

    If CheckBox2.Value = True Then

    Sheets("Tableau IJSS").PageSetup.Orientation = xlLandscape

    Application.Dialogs(Excel.XlBuiltInDialog.xlDialogPrinterSetup).Show

    Sheets("Tableau IJSS").PrintOut

    With Worksheets("Tableau IJSS").PageSetup
    .Zoom = False
    .FitToPagesTall = 1
    .FitToPagesWide = 1
End With

Unload Me

    End If
    End If

End Sub

Private Sub CommandButton2_Click()

Unload Me

End Sub
Rechercher des sujets similaires à "impression page orientation paysage ajuster"