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
| Sub STAT()
Dim a As Boolean, b As Boolean, c As Boolean, d As Boolean, e As Boolean, f As Boolean
Dim g As Boolean, h As Boolean, i As Boolean, j As Boolean, k As Boolean, l As Boolean
Dim m As Boolean, n As Boolean, o As Boolean, p As Boolean
Dim w, x, y, z, ligne, col, test, qte
'initialisation
a = Cells(16, "H").Value
'---------------
o = Cells(16, "V").Value
ligne = 3
col = 18 'R
'inscription des valeurs dans les cases
Range("R4").Value = a
'---------------------
Range("af10").Value = o
InputBox ("nombre de répétition ? " & qte)
'----
For x = 1 To qte 'repetition
'test = 1
For test = 1 To 5
Select Case test
Case 1
Select Case a
Case 0
ligne = 5
col = 10
test = 2
a = 1
With Cells(5, "r").Borders(xlDiagonalDown)
.LineStyle = xlContinuous
.Weight = xlThick
.ColorIndex = 4
End With
Cells(5, "r").Borders(xlDiagonalUp).LineStyle = xlNone
Case 1
ligne = 5
col = 26
test = 2
a = 0
With Cells(5, "r").Borders(xlDiagonalUp)
.LineStyle = xlContinuous
.Weight = xlThick
.ColorIndex = 4
End With
Cells(5, "r").Borders(xlDiagonalDown).LineStyle = xlNone
End Select 'a
Case 2
Select Case b
'----------- |
Partager