HELP : Comment imprimer 2 feuilles Excel avec les macros ???

  • Initiateur de la discussion Initiateur de la discussion mahamalily
  • Date de début Date de début

Boostez vos compétences Excel avec notre communauté !

Rejoignez Excel Downloads, le rendez-vous des passionnés où l'entraide fait la force. Apprenez, échangez, progressez – et tout ça gratuitement ! 👉 Inscrivez-vous maintenant !

M

mahamalily

Guest
J'ai un document excel (comme mis en pièce jointe)
Je souhaiterais que lorsque j'appuie sur mon bouton, ca m'affiche en aperçu avant impression (vu que c'est ce que fais mon code) mais qu'il affiche les 2 tableaux une page après l'autre... sans que j'ai à fermer pour que ca raffiche l'autre...

Voici une partie du code :

Code:
Sub Impression()
  
   Application.ScreenUpdating = False
   Sheets("Feuill2").Visible = True
   Sheets("Feuill2").Select
   Range("A1:M9").Select
   With selection.Font
    .Name = "Calibri"
    .Size = 10
    .Strikethrough = False
    .Superscript = False
    .Subscript = False
    .OutlineFont = False
    .Shadow = False
    .Underline = xlUnderlineStyleNone
    .ColorIndex = xlAutomatic
    .Bold = True
   End With
  
   ActiveSheet.PageSetup.PrintArea = "$A$1:$F$9"
   ActiveSheet.PageSetup.PrintArea = "$H$1:$M$9"
   With ActiveSheet.PageSetup
    .LeftHeader = ""
    .CenterHeader = ""
    .RightHeader = ""
    .LeftFooter = ""
    .CenterFooter = ""
    .RightFooter = ""
        .LeftMargin = Application.InchesToPoints(1)
        .RightMargin = Application.InchesToPoints(1)
        .TopMargin = Application.InchesToPoints(0.5)
        .BottomMargin = Application.InchesToPoints(0.5)
        .HeaderMargin = Application.InchesToPoints(0.5)
        .FooterMargin = Application.InchesToPoints(0.5)
        .Zoom = False
        .FitToPagesWide = 1
        .FitToPagesTall = 1
    .PrintHeadings = False
    .PrintGridlines = False
    .PrintComments = xlPrintNoComments
    .CenterHorizontally = True
    .CenterVertically = True
    .Orientation = xlPortrait
    .Draft = False
    .PaperSize = xlPaperA4
    .FirstPageNumber = xlAutomatic
    .Order = xlDownThenOver
    .BlackAndWhite = False
    .Zoom = False
    .FitToPagesWide = 1
    .FitToPagesTall = 1
   End With
      Application.ScreenUpdating = True
   ActiveWindow.SelectedSheets.PrintPreview
      Application.ScreenUpdating = True
   ActiveWindow.SelectedSheets.PrintPreview
   Sheets("Feuill2").Visible = False
  Sheets("Feuill1").Select
End Sub

Alors, comment je peux faire SVP ??.....
 

Pièces jointes

  • test.jpg
    test.jpg
    39.7 KB · Affichages: 159
  • test.jpg
    test.jpg
    39.7 KB · Affichages: 170
  • test.jpg
    test.jpg
    39.7 KB · Affichages: 182
Dernière modification par un modérateur:
- Navigue sans publicité
- Accède à Cléa, notre assistante IA experte Excel... et pas que...
- Profite de fonctionnalités exclusives
Ton soutien permet à Excel Downloads de rester 100% gratuit et de continuer à rassembler les passionnés d'Excel.
Je deviens Supporter XLD

Discussions similaires

Réponses
7
Affichages
344
J
Réponses
6
Affichages
3 K
M
Réponses
2
Affichages
811
M
P
Réponses
6
Affichages
1 K
Pieerre69
P
Retour