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 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133
| Sub macro_liste()
Dim reference2 As Integer
reference2 = Cells(1, 1)
If reference2 = 1 Then
Range("C4:E15").Select
With Selection.Interior
.Pattern = xlNone
.TintAndShade = 0
.PatternTintAndShade = 0
End With
Range("B4:E15").Select
Selection.ClearContents
Range("B4").Select
ActiveCell.FormulaR1C1 = "Reception"
Range("B5").Select
ActiveCell.FormulaR1C1 = "Fraisage CN 5 Axes"
Range("B6").Select
ActiveCell.FormulaR1C1 = "A/M"
Range("B7").Select
ActiveCell.FormulaR1C1 = "Contrôle"
Range("B8").Select
ActiveCell.FormulaR1C1 = "Expédition et conditionnement"
Range("B9").Select
ActiveCell.FormulaR1C1 = "Sous-traitance : Traitement thermique"
Range("B10").Select
ActiveCell.FormulaR1C1 = "Reception/Contrôle "
Range("B11").Select
ActiveCell.FormulaR1C1 = "Rectification traditionnelle"
Range("B12").Select
ActiveCell.FormulaR1C1 = "Fraisage CN"
Range("B13").Select
ActiveCell.FormulaR1C1 = "A/M"
Range("B14").Select
ActiveCell.FormulaR1C1 = "Contrôle"
Range("B15").Select
ActiveCell.FormulaR1C1 = "Livraison TIMECA"
Range("D4,C6,C7,D8,D10,C11,C12,C13,C14,D15").Select
Range("D15").Activate
Cells(4, 3) = 1
Range("D4,C6,C7,C11,C12,C13,C14,D15,D8,D10").Select
Range("D10").Activate
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorAccent4
.TintAndShade = 0.599963377788629
.PatternTintAndShade = 0
End With
End If
If reference2 = 2 Then
Range("C4:E15").Select
With Selection.Interior
.Pattern = xlNone
.TintAndShade = 0
.PatternTintAndShade = 0
End With
Range("B4:E15").Select
Selection.ClearContents
Range("B4").Select
ActiveCell.FormulaR1C1 = "Reception"
Range("B5").Select
ActiveCell.FormulaR1C1 = "Tournage CN"
Range("B6").Select
ActiveCell.FormulaR1C1 = "A/M"
Range("B7").Select
ActiveCell.FormulaR1C1 = "Contrôle"
Range("B8").Select
ActiveCell.FormulaR1C1 = "Livraison TIMECA"
Cells(4, 3) = 2
Range("D4,C6,C7,D8").Select
Range("D8").Activate
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorAccent4
.TintAndShade = 0.599963377788629
.PatternTintAndShade = 0
End With
End If
If reference2 = 3 Then
Range("C4:E15").Select
With Selection.Interior
.Pattern = xlNone
.TintAndShade = 0
.PatternTintAndShade = 0
End With
Range("B4:E15").Select
Selection.ClearContents
Range("B4").Select
ActiveCell.FormulaR1C1 = "Reception"
Range("B5").Select
ActiveCell.FormulaR1C1 = "Tournage CN"
Range("B6").Select
ActiveCell.FormulaR1C1 = "Contrôle"
Range("B7").Select
ActiveCell.FormulaR1C1 = "Expédition et conditionnement"
Range("B8").Select
ActiveCell.FormulaR1C1 = "Sous-traitance : Traitement thermique"
Range("B9").Select
ActiveCell.FormulaR1C1 = "Reception/contrôle"
Range("B10").Select
ActiveCell.FormulaR1C1 = "Livraison TIMECA"
Cells(4, 3) = 3
Range("D4,C6,D7,D10").Select
Range("D8").Activate
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorAccent4
.TintAndShade = 0.599963377788629
.PatternTintAndShade = 0
End With
End If
End Sub |
Partager