My problem is, how do I format/create cell borders so that the top of a
range of cells has a single continuous border, and the bottom of the same
cells has a double continuous border.
I have tried the following, as well as other commands, But they either do
nothing, or do not produce
the effect I am after. I basically want to be able to apply a thin
continuous line to the top of cells
in a range, and a thick continuous line to the bottom of the same cells in
the range, ie for Totals
and SubTotals.
XLWsheet.Range[Var1,Var2].Borders.LineStyle:=xlContinuous;
XLWsheet.Range[Var1,Var2].Borders.Value:=xlEdgeBottom;
XLWsheet.Range[Var1,Var2].Borders.Weight:=xlThick;
XLWsheet.Range[Var1,Var2].BorderAround(xlContinuous,xlThin,xlAutomatic,xlAut
omatic);
I have looked at the infamous Deborah Pate page at
http://www.djpate.freeserve.co.uk/ but it just falls short on showing how to
apply
borders, I have also looked through various other sites with no luck.
Could someone please provide an Example or point me to another website
Below is Code from a Recorded EXCEL Macro, but how do I convert it to Delphi
Range("C10:L10").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
Selection.Borders(xlEdgeLeft).LineStyle = xlNone
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlDouble
.Weight = xlThick
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlEdgeRight).LineStyle = xlNone
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Range("C14").Select
regards
pe.
Nearly there, but you have to use the Item method to
specify the border you want to change:
WS.Range['A5', 'D5'].Borders.Item[xlEdgeTop].Linestyle
:= xlContinuous;
WS.Range['A5', 'D5'].Borders.Item[xlEdgeBottom].Linestyle
:= xlDouble;
--
Deborah Pate (TeamB) http://delphi-jedi.org
Use Borland servers; TeamB don't see posts via ISPs
http://www.borland.com/newsgroups/genl_faqs.html
PE.
"Deborah Pate (TeamB)" <d.p...@cableinet.co.not-this-bit.uk> wrote in
message news:VA.000008f...@cableinet.co.not-this-bit.uk...