>** Now apply borders to each header cell > lcRange = "A" + ALLTRIM(STR(m.lnLines + m.lnoffset)) + ":" + ; > m.lcEnd + ALLTRIM(STR(m.lnLines + m.lnoffset)) > > WITH loSheet.RANGE(m.lcRange) > WITH .BORDERS(xlEdgeLeft) > .LineStyle = xlContinuous > .Weight = xlThin > .ColorIndex = xlAutomatic > ENDWITH > WITH .BORDERS(xlEdgeTop) > .LineStyle = xlContinuous > .Weight = xlThin > .ColorIndex = xlAutomatic > ENDWITH > WITH .BORDERS(xlEdgeBottom) > .LineStyle = xlContinuous > .Weight = xlThin > .ColorIndex = xlAutomatic > ENDWITH > WITH .BORDERS(xlEdgeRight) > .LineStyle = xlContinuous > .Weight = xlThin > .ColorIndex = xlAutomatic > ENDWITH > WITH .BORDERS(xlInsideVertical) > .LineStyle = xlContinuous > .Weight = xlThin > .ColorIndex = xlAutomatic > ENDWITH > ENDWITH >Thanks, I have that file.