voilà ce que j'ai fait après l'adaptation d'une macro excel
crée un cadre autout de la cellule
t représente la cellule à encadrer ("A1" par exemple)
Private
Sub Encadre(ByVal t As String)
xlsheet.Range(t).Borders(Excel.XlBordersIndex.xlDiagonalDown).LineStyle = Excel.Constants.xlNone
xlsheet.Range(t).Borders(Excel.XlBordersIndex.xlDiagonalUp).LineStyle = Excel.Constants.xlNone
With xlsheet.Range(t).Borders(Excel.XlBordersIndex.xlEdgeLeft)
.LineStyle = Excel.XlLineStyle.xlContinuous
.Weight = Excel.XlBorderWeight.xlThin
.ColorIndex = Excel.Constants.xlAutomatic
End With
With xlsheet.Range(t).Borders(Excel.XlBordersIndex.xlEdgeTop)
.LineStyle = Excel.XlLineStyle.xlContinuous
.Weight = Excel.XlBorderWeight.xlThin
.ColorIndex = Excel.Constants.xlAutomatic
End With
With xlsheet.Range(t).Borders(Excel.XlBordersIndex.xlEdgeBottom)
.LineStyle = Excel.XlLineStyle.xlContinuous
.Weight = Excel.XlBorderWeight.xlThin
.ColorIndex = Excel.Constants.xlAutomatic
End With
With xlsheet.Range(t).Borders(Excel.XlBordersIndex.xlEdgeRight)
.LineStyle = Excel.XlLineStyle.xlContinuous
'.Weight = Excel.XlBorderWeight.xlThin
.ColorIndex = Excel.Constants.xlAutomatic
End Withend sub
@+
LIM