Highlighted
Absent Member.
Absent Member.
248 views

[archive] Excel and borders

[Migrated content. Thread originally posted on 04 October 2007]

I am having difficulty in finding how to set specific borders on an excel cell - i.e. top, bottom,left,right.

To set a border around the cell is
MODIFY olWrkSh Range(w-full-range)::BorderAround (
xlContinuous
xlthin
xlAutomatic).

But I cannot find how to set or use the equivalent of
Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic

The class range does not have these methods.


Can anyone Help?
0 Likes
1 Reply
Highlighted
Absent Member.
Absent Member.

RE: [archive] Excel and borders

Borders is a property of the range object.
This return a border object. This object is a collection which default parameter is its itemizer.

So, if you modify your above to:

77 olBorders HANDLE OF BORDERS.
...
INQUIRE olWrkSh Range(w-full-range)::Borders IN olBorders.
MODIFY olBorders @Item(xlEdgeTop)::LineStyle = xlContinous.

You should be all set.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.