Private Sub CommandButton1_Click()
Application.ScreenUpdating = False
Imprimer.Hide
Range("T1").Value = Imprimer.ComboBox1.Value
Range("T2").Value = Imprimer.ComboBox2.Value
If Imprimer.ComboBox1.Value <> "" Then
With ActiveSheet
.PageSetup.PrintArea = "$C$4:$O$69"
Range("M5") = "[Duplicata]"
Application.ActivePrinter = "\\gresrvr01\GRE_HP_4350_59A sur Ne02:"
For y = 1 To [T1]
For x = 1 To .HPageBreaks.Count + 1
.PrintOut From:=x, To:=x, Copies:=1, Collate:=True
Next x
Next y
End With
End If
If Range("F31") <> "" Then
With ActiveSheet
.PageSetup.PrintArea = "$C$73:$O$139"
Range("M5") = "[Duplicata]"
Application.ActivePrinter = "\\gresrvr01\GRE_HP_4350_59A sur Ne02:"
For y = 1 To [T1]
For x = 1 To .HPageBreaks.Count + 1
.PrintOut From:=x, To:=x, Copies:=1, Collate:=True
Next x
Next y
End With
End If
If Range("F131") <> "" Then
Else: Range("T1") = ""
End If
If Imprimer.ComboBox2.Value = "" Then
Range("T2") = ""
ElseIf ComboBox2.Value <> "" Then
Range("M5") = "[Original]"
With ActiveSheet
.PageSetup.PrintArea = "$C$4:$O$69"
Application.ActivePrinter = "\\gresrvr01\GRE_HP_4350_59A sur Ne02:"
For y = 1 To [T2]
For x = 1 To .HPageBreaks.Count + 1
.PrintOut From:=x, To:=x, Copies:=1, Collate:=True
Next x
Next y
End With
If Range("F131") <> "" Then
With ActiveSheet
.PageSetup.PrintArea = "$C$73:$O$139"
Range("M5") = "[Original]"
Application.ActivePrinter = "\\gresrvr01\GRE_HP_4350_59A sur Ne02:"
For y = 1 To [T2]
For x = 1 To .HPageBreaks.Count + 1
.PrintOut From:=x, To:=x, Copies:=1, Collate:=True
Next x
Next y
End With
End If
End If
Range("A3").Select
End Sub