The OCX-Interface for writing into excel is a fine thing. But is there any way to format the Borders.
The following statement is working
sheet.range('A1:A5').Borders.LineStyle := 1;
But all cells will have a full border around.
If I try to set only bottom Borders like in VBA I get an error message. (9 is identical to xlBottom)
sheet.range('A1:A5').Borders(9).LineStyle := 1;
Where is my mistake? Or is there any other way to format the Cell-Border?
Thanks for your help
0
Comments
I´m using this to make borders only on one side:
//define positions
bottom:=9;
top:=8;
left:=11;
right:=2;
xlSheet.Range('A7:AP7').Borders.Item(left).LineStyle := 1;
This should work