Voilà
With Range(Cells(j * 4 + 6, 43), Cells(j * 4 + 6, 45))
.Merge
.Borders(xlEdgeBottom).LineStyle = xlContinuous
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.Value = "Observations"
.Interior.Color = RGB(0, 114, 0)
End With
ça me l'a fait aussi sur celui là et ça a arrêté :
With Range(Cells(Taille * 4 + 2, 16), Cells(Taille * 4 + 4, 19))
.Borders(xlEdgeLeft).LineStyle = xlContinuous
.Borders(xlEdgeLeft).Weight = xlMedium
.Borders(xlEdgeTop).LineStyle = xlContinuous
.Borders(xlEdgeTop).Weight = xlMedium
.Borders(xlEdgeBottom).LineStyle = xlContinuous
.Borders(xlEdgeBottom).Weight = xlMedium
.Borders(xlEdgeRight).LineStyle = xlContinuous
.Borders(xlEdgeRight).Weight = xlMedium
End With
Bonjour papou,
Si je ne m'abuse le paramètre 11 est value (qui serait synonyme de linestyle) et en remplaçant linestyle par value ça fonctionne...
Bizarre pour un synonyme mais je ne vais pas m'en pleindre ^^
Merci à vous
Rectification,
ça marche pour ce code :
With Range(Cells(j * 4 + 6, 43), Cells(j * 4 + 6, 45))
.Merge
.Borders.Value = xlContinuous
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.Value = "Observations ONF"
.Interior.Color = RGB(0, 114, 0)
End With
Mais pas pour celui là :
With Range(Cells(j * 4 + 6, 43), Cells(j * 4 + 8, 45))
.Borders(xlEdgeLeft).Value = xlContinuous
.Borders(xlEdgeLeft).Weight = xlMedium
.Borders(xlEdgeTop).Value = xlContinuous
.Borders(xlEdgeTop).Weight = xlMedium
.Borders(xlEdgeBottom).Value = xlContinuous
.Borders(xlEdgeBottom).Weight = xlMedium
.Borders(xlEdgeRight).Value = xlContinuous
.Borders(xlEdgeRight).Weight = xlMedium
End With
Je n'y comprend rien... (ça ne fonctionne pas non plus avec borderaround)