Dim avlBorders() As Variant, i As Integer avlBorders = Array(xlEdgeLeft, xlEdgeTop, xlEdgeBottom, xlEdgeRight) Range("A1").Select ' Et puis d'autes choses plus loin For i = LBound(avlBorders) To UBound(avlBorders) With Selection.Borders(CLng(avlBorders(i))) .LineStyle = xlContinuous .ColorIndex = xlAutomatic .TintAndShade = 0 .Weight = xlThin End With Next i erase avlBorders
Range("A1").Select' Et puis d'autes choses plus loin With Selection.Borders(xlEdgeLeft) .LineStyle = xlContinuous .ColorIndex = xlAutomatic .TintAndShade = 0 .Weight = xlThin End With With Selection.Borders(xlEdgeTop) .LineStyle = xlContinuous .ColorIndex = xlAutomatic .TintAndShade = 0 .Weight = xlThin End With With Selection.Borders(xlEdgeBottom) .LineStyle = xlContinuous .ColorIndex = xlAutomatic .TintAndShade = 0 .Weight = xlThin End With With Selection.Borders(xlEdgeRight) .LineStyle = xlContinuous .ColorIndex = xlAutomatic .TintAndShade = 0 .Weight = xlThin End With
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionDim i As Integer Range("A1").Select ' Et puis d'autes choses plus loin For i = 7 To 10 With Selection.Borders(i) .LineStyle = xlContinuous .ColorIndex = xlAutomatic .TintAndShade = 0 .Weight = xlThin End With Next i