1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
| Sub editionoi_cliquer()
'
'Imprimer la page en cours avec le choix de plusieurs types d'impressions
'
If MsgBox("impression de la totalité", vbYesNo + vbQuestion) = vbYes Then
ActiveWindow.SelectedSheets.PrintOut From:=1, to:=Range("Ab3"), Copies:=1, _
Collate:=True, IgnorePrintAreas:=False
ElseIf MsgBox("impression des FE", vbYesNo + vbQuestion) = vbYes Then
ActiveSheet.ListObjects("synthese5").Range.AutoFilter Field:=5, Criteria1:= _
"<>"
ActiveWindow.SelectedSheets.PrintOut From:=1, to:=Range("Ab4"), Copies:=1, _
Collate:=True, IgnorePrintAreas:=False
ActiveSheet.ListObjects("synthese5").Range.AutoFilter Field:=5
ElseIf MsgBox("impression des END", vbYesNo + vbQuestion) = vbYes Then
ActiveSheet.ListObjects("synthese5").Range.AutoFilter Field:=6, Criteria1:= _
"<>"
ActiveWindow.SelectedSheets.PrintOut From:=1, to:=Range("Ab5"), Copies:=1, _
Collate:=True, IgnorePrintAreas:=False
ActiveSheet.ListObjects("synthese5").Range.AutoFilter Field:=6
ElseIf MsgBox("impression activités SIR", vbYesNo + vbQuestion) = vbYes Then
ActiveSheet.ListObjects("synthese5").Range.AutoFilter Field:=7, Criteria1:= _
"<>"
ActiveWindow.SelectedSheets.PrintOut From:=1, to:=Range("Ab6"), Copies:=1, _
Collate:=True, IgnorePrintAreas:=False
ActiveSheet.ListObjects("synthese5").Range.AutoFilter Field:=7
ElseIf MsgBox("impression activités VB", vbYesNo + vbQuestion) = vbYes Then
ActiveSheet.ListObjects("synthese5").Range.AutoFilter Field:=8, Criteria1:= _
"<>"
ActiveWindow.SelectedSheets.PrintOut From:=1, to:=Range("Ab7"), Copies:=1, _
Collate:=True, IgnorePrintAreas:=False
ActiveSheet.ListObjects("synthese5").Range.AutoFilter Field:=8
End If
End Sub |
Partager