>WITH .Parent.Styles("Cell") > .Borders(xlEdgeTop).LineStyle = xlContinuous > .Borders(xlEdgeLeft).LineStyle = xlContinuous > .Borders(xlEdgeRight).LineStyle = xlContinuous > .Borders(xlEdgeBottom).LineStyle = xlContinuous >ENDWITH > >**-- set all cells with borders >FOR lnI = 1 TO .usedRange.columns.count > FOR lnJ = 1 TO .UsedRange.rows.count lcRange = [.Range("] + CHR(lnI + 64) + ALLTRIM(STR(lnj)) + [").Style = "Cell"] > &lcRange >ENDFOR >ENDFOR >John,
**-- set all cells with borders .UsedRange.Cells.Style = "Cell"Doing cell by cell means to call VBA numerous times which is an overkill.
lcRange = [.Range("] + CHR(lnI + 64) + ALLTRIM(STR(lnj)) + [").Style = "Cell"] &lcRangeUse this :
lcRange = CHR(lnI + 64) + ALLTRIM(STR(lnj)) .Range(lcRange).Style = "Cell"Cetin