Skip to main content

[Migrated content. Thread originally posted on 29 November 2005]

I want to drow a horizontal line at the bottom of a range of cells.

         
INQUIRE olWrkSh @Range("F4:I4") IN olRange;
MODIFY olRange @????

[Migrated content. Thread originally posted on 29 November 2005]

I want to drow a horizontal line at the bottom of a range of cells.

         
INQUIRE olWrkSh @Range("F4:I4") IN olRange;
MODIFY olRange @????
You mean like strikeout of a font?

[Migrated content. Thread originally posted on 29 November 2005]

I want to drow a horizontal line at the bottom of a range of cells.

         
INQUIRE olWrkSh @Range("F4:I4") IN olRange;
MODIFY olRange @????
In Excel you can draw a border around a cell.
In stead of a border, I want to select the bottom line.

[Migrated content. Thread originally posted on 29 November 2005]

I want to drow a horizontal line at the bottom of a range of cells.

         
INQUIRE olWrkSh @Range("F4:I4") IN olRange;
MODIFY olRange @????
i used in the past:

modify xls-range @Borders::@LineStyle = 1.
modify xls-range @Borders::@Weight = 1.

this, worked for me, but seems you can't do exactly what you want.

if i create an excel-macro i get this code:


    Range("A1:G1").Select
    Selection.Borders(xlDiagonalDown).LineStyle = xlNone
    Selection.Borders(xlDiagonalUp).LineStyle = xlNone
    Selection.Borders(xlEdgeLeft).LineStyle = xlNone
    Selection.Borders(xlEdgeTop).LineStyle = xlNone
    With Selection.Borders(xlEdgeBottom)
        .LineStyle = xlContinuous
        .Weight = xlThin
        .ColorIndex = xlAutomatic
    End With
    Selection.Borders(xlEdgeRight).LineStyle = xlNone
    Selection.Borders(xlInsideVertical).LineStyle = xlNone


seems so that you first have to get the style from every side.


      * Item
               PROPERTY-GET, 170, @Item,
                   "XlBordersIndex" @Index, TYPE 3
                       RETURNING "Border*", TYPE 9
      * _Default
               PROPERTY-GET, 0, @_Default,
                   "XlBordersIndex" @Index, TYPE 3
                       RETURNING "Border*", TYPE 9

---------------------------------------------------------------

      * XlBordersIndex
           CLASS @XlBordersIndex
               CLSID, 00000000-0000-0000-0000-000000000000
               NAME, "XlBordersIndex"
      * "long xlInsideHorizontal"
               ENUMERATOR, @xlInsideHorizontal, 12
      * "long xlInsideVertical"
               ENUMERATOR, @xlInsideVertical, 11
      * "long xlDiagonalDown"
               ENUMERATOR, @xlDiagonalDown, 5
      * "long xlDiagonalUp"
               ENUMERATOR, @xlDiagonalUp, 6
      * "long xlEdgeBottom"
               ENUMERATOR, @xlEdgeBottom, 9
      * "long xlEdgeLeft"
               ENUMERATOR, @xlEdgeLeft, 7
      * "long xlEdgeRight"
               ENUMERATOR, @xlEdgeRight, 10
      * "long xlEdgeTop"
               ENUMERATOR, @xlEdgeTop, 8



but i have at the moment no idea how to handle this index.

David

[Migrated content. Thread originally posted on 29 November 2005]

I want to drow a horizontal line at the bottom of a range of cells.

         
INQUIRE olWrkSh @Range("F4:I4") IN olRange;
MODIFY olRange @????
Great example David, I particularly like that you illustrate how extremely useful the macro capability of Excel is in cases like this.

As for the index, you simply use one of the enumerators of the class, like:


MODIFY Selection Borders(xlEdgeTop)::LineStyle = xlNone

[Migrated content. Thread originally posted on 29 November 2005]

I want to drow a horizontal line at the bottom of a range of cells.

         
INQUIRE olWrkSh @Range("F4:I4") IN olRange;
MODIFY olRange @????
If I use this code

MODIFY olRange @Borders(xlEdgeTop)::LineStyle = xlNone

I get the following error :
Wrong number of parameters: 0 expected, 1 found

[Migrated content. Thread originally posted on 29 November 2005]

I want to drow a horizontal line at the bottom of a range of cells.

         
INQUIRE olWrkSh @Range("F4:I4") IN olRange;
MODIFY olRange @????
i tested it fast.

this works for me:

modify xls-range @Borders::@Item(xlEdgeBottom)::@LineStyle = xlContinuous.
modify xls-range @Borders::@Item(xlEdgeBottom)::@Weight = xlThick.

or to get it in one line :)

modify xls-range @Borders::@Item(9)::@LineStyle = 1.
modify xls-range @Borders::@Item(9)::@Weight = 4.


David

[Migrated content. Thread originally posted on 29 November 2005]

I want to drow a horizontal line at the bottom of a range of cells.

         
INQUIRE olWrkSh @Range("F4:I4") IN olRange;
MODIFY olRange @????
This works just fine ... Txs alot