Me.AxSpreadsheet1.Selection.Borders.ColorIndex = 45
Dim xlt As Excel.XlBorderWeight = Excel.XlBorderWeight.xlMedium
Dim xll As Excel.XlLineStyle = Excel.XlLineStyle.xlContinuous
With Me.AxSpreadsheet1.Selection
With .Borders(Microsoft.Office.Interop.Owc11.XlBordersIndex.xlEdgeBottom)
.Weight = xlt
.LineStyle = xll
End With
With .Borders(Microsoft.Office.Interop.Owc11.XlBordersIndex.xlEdgeLeft)
.Weight = xlt
.LineStyle = xll
End With
With .Borders(Microsoft.Office.Interop.Owc11.XlBordersIndex.xlEdgeRight)
.Weight = xlt
.LineStyle = xll
End With
With .Borders(Microsoft.Office.Interop.Owc11.XlBordersIndex.xlEdgeTop)
.Weight = xlt
.LineStyle = xll
End With
End With