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
| Public Sub MAJ_mise_en_forme()
DernCol = Cells(4, Columns.Count).End(xlToLeft).Column
For x = 5 To DernCol
'mise en forme des bordures gauche et droite des équipes 1 à 3
For L = 13 To 23 'équipe 1
With Cells(L, x).Borders(xlEdgeLeft) 'bordure gauche
.Color = RGB(96, 108, 149)
.LineStyle = xlContinuous
.Weight = xlMedium
End With
With Cells(L, x).Borders(xlEdgeRight) 'bordure droite
.Color = RGB(96, 108, 149)
.LineStyle = xlContinuous
.Weight = xlMedium
End With
Next L
For L = 25 To 35 'équipe 2
With Cells(L, x).Borders(xlEdgeLeft) 'bordure gauche
.Color = RGB(96, 108, 149)
.LineStyle = xlContinuous
.Weight = xlMedium
End With
With Cells(L, x).Borders(xlEdgeRight) 'bordure droite
.Color = RGB(96, 108, 149)
.LineStyle = xlContinuous
.Weight = xlMedium
End With
Next L
For L = 37 To 47 'équipe 3
With Cells(L, x).Borders(xlEdgeLeft) 'bordure gauche
.Color = RGB(96, 108, 149)
.LineStyle = xlContinuous
.Weight = xlMedium
End With
With Cells(L, x).Borders(xlEdgeRight) 'bordure droite
.Color = RGB(96, 108, 149)
.LineStyle = xlContinuous
.Weight = xlMedium
End With
Next L
Next x
End Sub |
Partager