Options

Setting borders in Excel Output

Christian_BuehlChristian_Buehl Member Posts: 145
edited 2002-05-07 in Navision Financials
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

Comments

  • Options
    Stephan_FehrmannStephan_Fehrmann Member Posts: 3
    Hi Chris,

    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
Sign In or Register to comment.