I want to set a border in Excel using automation. I know the BorderAround method wich works if you want a full border.
But now I just need a vertical line, so I need the Borders-property.
This is some VB Code:
With Worksheets("Sheet1").Range("B2").Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 3
End With
How to code this in Navision? The problem is: how to set xlEdgeRight (= 10)?
Comments
xlRange := xlWorksheet.Range('B2');
xlRange.Borders.Item(10).LineStyle(1); //Const xlEdgeRight = 10 //Const xlContinuous = 1
xlRange.Borders.Item(10).Color := 255; //red
Works fine.