mycolumn = Range("A1").CurrentRegion.Columns.Count
Set myrange = Range("A1").CurrentRegion
For Each mycell In myrange
Set myrow = mycell.EntireRow
If myrow.PageBreak = xlNone Then
GoTo Nex
Else
Set arow = Range(Cells(myrow.Offset(-1).Row, 1), Cells(myrow.Offset(-1).Row,
mycolumn))
With arow.Borders(xlEdgeBottom)
..LineStyle = xlDouble '把這一行改成自己喜歡的表線
..Weight = xlThick
..ColorIndex = xlAutomatic
End With
End If
Nex: Next mycell