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 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85
| Private Sub enregistrer_Click()
Dim Tab_F() As Sheets
ReDim Tab_F(0)
If enr_janvier = True Then
ReDim Preserve Tab_F(UBound(Tab_F) + 1)
Set Tab_F(UBound(Tab_F)) = Sheets("Janv")
End If
If enr_fevrier = True Then
ReDim Preserve Tab_F(UBound(Tab_F) + 1)
Set Tab_F(UBound(Tab_F)) = Sheets("Fev")
End If
If enr_mars = True Then
ReDim Preserve Tab_F(UBound(Tab_F) + 1)
Set Tab_F(UBound(Tab_F)) = Sheets("Mars")
End If
If enr_avril = True Then
ReDim Preserve Tab_F(UBound(Tab_F) + 1)
Set Tab_F(UBound(Tab_F)) = Sheets("Avril")
End If
If enr_mai = True Then
ReDim Preserve Tab_F(UBound(Tab_F) + 1)
Set Tab_F(UBound(Tab_F)) = Sheets("Mai")
End If
If enr_juin = True Then
ReDim Preserve Tab_F(UBound(Tab_F) + 1)
Set Tab_F(UBound(Tab_F)) = Sheets("Juin")
End If
If enr_juillet = True Then
ReDim Preserve Tab_F(UBound(Tab_F) + 1)
Set Tab_F(UBound(Tab_F)) = Sheets("Juil")
End If
If enr_aout = True Then
ReDim Preserve Tab_F(UBound(Tab_F) + 1)
Set Tab_F(UBound(Tab_F)) = Sheets("Aout")
End If
If enr_septembre = True Then
ReDim Preserve Tab_F(UBound(Tab_F) + 1)
Set Tab_F(UBound(Tab_F)) = Sheets("Sept")
End If
If enr_octobre = True Then
ReDim Preserve Tab_F(UBound(Tab_F) + 1)
Set Tab_F(UBound(Tab_F)) = Sheets("Oct")
End If
If enr_novembre = True Then
ReDim Preserve Tab_F(UBound(Tab_F) + 1)
Set Tab_F(UBound(Tab_F)) = Sheets("Nov")
End If
If enr_decembre = True Then
ReDim Preserve Tab_F(UBound(Tab_F) + 1)
Set Tab_F(UBound(Tab_F)) = Sheets("Dec")
End If
Application.ActivePrinter = "PDFCreator sur Ne00:"
Select Case UBound(Tab_F)
Case 1
Sheets(Array(Tab_F(1))).PrintOut
Case 2
Sheets(Array(Tab_F(1), Tab_F(2))).PrintOut
Case 3
Sheets(Array(Tab_F(1), Tab_F(2), Tab_F(3))).PrintOut
Case 4
Sheets(Array(Tab_F(1), Tab_F(2), Tab_F(3), Tab_F(4))).PrintOut
Case 5
Sheets(Array(Tab_F(1), Tab_F(2), Tab_F(3), Tab_F(4), Tab_F(5))).PrintOut
Case 6
Sheets(Array(Tab_F(1), Tab_F(2), Tab_F(3), Tab_F(4), Tab_F(5), Tab_F(6))).PrintOut
Case 7
Sheets(Array(Tab_F(1), Tab_F(2), Tab_F(3), Tab_F(4), Tab_F(5), Tab_F(6), _
Tab_F(7))).PrintOut
Case 8
Sheets(Array(Tab_F(1), Tab_F(2), Tab_F(3), Tab_F(4), Tab_F(5), Tab_F(6), _
Tab_F(7), Tab_F(8))).PrintOut
Case 9
Sheets(Array(Tab_F(1), Tab_F(2), Tab_F(3), Tab_F(4), Tab_F(5), Tab_F(6), _
Tab_F(7), Tab_F(8), Tab_F(9))).PrintOut
Case 10
Sheets(Array(Tab_F(1), Tab_F(2), Tab_F(3), Tab_F(4), Tab_F(5), Tab_F(6), _
Tab_F(7), Tab_F(8), Tab_F(9), Tab_F(10))).PrintOut
Case 11
Sheets(Array(Tab_F(1), Tab_F(2), Tab_F(3), Tab_F(4), Tab_F(5), Tab_F(6), _
Tab_F(7), Tab_F(8), Tab_F(9), Tab_F(10), Tab_F(11))).PrintOut
Case 12
Sheets(Array(Tab_F(1), Tab_F(2), Tab_F(3), Tab_F(4), Tab_F(5), Tab_F(6), _
Tab_F(7), Tab_F(8), Tab_F(9), Tab_F(10), Tab_F(11), Tab_F(12))).PrintOut
End Select
End Sub |
Partager