jacky49
XLDnaute Impliqué
bonsoir le forum,
Voici un code qui me permet de faire des bordures et qui fonctionne sur EXCEL 2003 mais qui BUg sur EXCEL 2007 mais je ne sais pas pourquoi.
La ligne en jaune qui bug.
Merci
jacky
Voici un code qui me permet de faire des bordures et qui fonctionne sur EXCEL 2003 mais qui BUg sur EXCEL 2007 mais je ne sais pas pourquoi.
La ligne en jaune qui bug.
Merci
jacky
Code:
Public Sub CADRERPOULE(ByVal shtX As Object, ByVal Categ As String, ByVal Kol As Integer, ByVal Lig As Integer)
With shtX
.Range(.Cells(Lig - 2, Kol + 2), .Cells(Lig - 1, Kol + 20)).ClearContents
With .Range(.Cells(Lig - 2, Kol + 2), .Cells(Lig + 6, Kol + 20))
.UnMerge
'.ClearContents
.Borders(xlEdgeLeft).LineStyle = xlNone
.Borders(xlEdgeTop).LineStyle = xlNone
.Borders(xlEdgeRight).LineStyle = xlNone
.Borders(xlEdgeBottom).LineStyle = xlNone
.Borders(xlInsideVertical).LineStyle = xlNone
.Borders(xlInsideHorizontal).LineStyle = xlNone
End With
.Cells(Lig - 1, Kol).Value = "Dossard"
.Cells(Lig - 1, Kol + 1).Value = "Arrivée"
If UCase(.Name) = "FINALE" Then
.Cells(Lig - 2, Kol).Value = "Finale " & Int((Kol + 1) / 3)
Else
.Cells(Lig - 2, Kol).Value = "Série " & (TOUR + 1) & "." & Int((Kol + 1) / 3)
End If
.Range(.Cells(Lig - 2, Kol), .Cells(Lig - 2, Kol + 1)).Merge
If TOUR = 0 And Kol = 2 Then .Cells(Lig - 4, 1).Value = "Catégorie: " & Categ
With .Range(.Cells(Lig - 2, Kol), .Cells(Lig - 1, Kol + 1))
.Borders(xlEdgeLeft).LineStyle = xlDouble
.Borders(xlEdgeRight).LineStyle = xlDouble
.Borders(xlEdgeTop).LineStyle = xlDouble
.Borders(xlEdgeBottom).LineStyle = xlDouble
.Borders(xlInsideVertical).LineStyle = xlDouble
.Borders(xlInsideHorizontal).LineStyle = xlDouble
End With
With .Range(.Cells(Lig, Kol), .Cells(Lig + 5, Kol + 1))
[COLOR="Yellow"].Borders(xlEdgeLeft).LineStyle = xlDouble[/COLOR]
.Borders(xlEdgeRight).LineStyle = xlDouble
.Borders(xlEdgeTop).LineStyle = xlDouble
.Borders(xlEdgeBottom).LineStyle = xlDouble
.Borders(xlInsideVertical).LineStyle = xlDouble
.Borders(xlInsideHorizontal).LineStyle = xlDash
End With
End With
End Sub