Impression de plusieurs feuilles
Bonjour,
Je voulais imprimer plusieurs feuilles en fonction de la case a cocher correspondante, la formule marche mais imprime qu'une feuille.
J'aurai besoin une fois de plus de vos lumières pour pouvoir imprimer toutes les feuilles souhaitées.
Voici la formule :
Sub ImpressionChoix()
Dim MenuImpression
IMPRESSION.Hide
If IMPRESSION.CheckBox1.Value = True Then
Sheets("SITU 1").Select
Sheets("CHARGE").Select
MenuImpression = Application.Dialogs(xlDialogPrint).Show(arg12:=1)
End If
If IMPRESSION.CheckBox1.Value = True Then
Sheets("CHARGE").Select
MenuImpression = Application.Dialogs(xlDialogPrint).Show(arg12:=1)
End If
If IMPRESSION.CheckBox2.Value = True Then
Sheets("SITU 2").Select
Sheets("CHARGE").Select
MenuImpression = Application.Dialogs(xlDialogPrint).Show(arg12:=1)
End If
If IMPRESSION.CheckBox3.Value = True Then
Sheets("BILAN").Select
Sheets("CHARGE").Select
Sheets("synthese").Select
MenuImpression = Application.Dialogs(xlDialogPrint).Show(arg12:=1)
End If
IMPRESSION.Show
End SubEn vous remerciant
Bien cordialement.
Sandrine
T
Bonjour,
Test de cette façon (False derrière Select pour ne pas dé sélectionner les précédentes) :
Sub ImpressionChoix()
Dim MenuImpression
IMPRESSION.Hide
If IMPRESSION.CheckBox1.Value = True Then
Sheets("SITU 1").Select
Sheets("CHARGE").Select (False)
MenuImpression = Application.Dialogs(xlDialogPrint).Show(arg12:=1)
End If
If IMPRESSION.CheckBox1.Value = True Then
Sheets("CHARGE").Select
MenuImpression = Application.Dialogs(xlDialogPrint).Show(arg12:=1)
End If
If IMPRESSION.CheckBox2.Value = True Then
Sheets("SITU 2").Select
Sheets("CHARGE").Select (False)
MenuImpression = Application.Dialogs(xlDialogPrint).Show(arg12:=1)
End If
If IMPRESSION.CheckBox3.Value = True Then
Sheets("BILAN").Select
Sheets("CHARGE").Select (False)
Sheets("synthese").Select (False)
MenuImpression = Application.Dialogs(xlDialogPrint).Show(arg12:=1)
End If
IMPRESSION.Show
'ThisWorkbook.PrintOut
End SubMerci beaucoup cela marche.
Bon week end