hello all
i am using this code to get the pagebreake location so i can put a border line at the end of each page (until row 100):
For j = 1 To ActiveSheet.HPageBreaks.Count
If ActiveSheet.HPageBreaks(j).Location.Row < 100 Then
i = ActiveSheet.HPageBreaks(j).Location.Row
Range(Cells(i - 1, 1), Cells(i, maxcol)).Select
With Selection.Borders(xlInsideHorizontal)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
End If
Next j
for some resone it works fine in several machines but in some others it gives me a wrong pagebreak location.
margins are the same...
any sugestions?
10x
michal
i am using this code to get the pagebreake location so i can put a border line at the end of each page (until row 100):
For j = 1 To ActiveSheet.HPageBreaks.Count
If ActiveSheet.HPageBreaks(j).Location.Row < 100 Then
i = ActiveSheet.HPageBreaks(j).Location.Row
Range(Cells(i - 1, 1), Cells(i, maxcol)).Select
With Selection.Borders(xlInsideHorizontal)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
End If
Next j
for some resone it works fine in several machines but in some others it gives me a wrong pagebreak location.
margins are the same...
any sugestions?
10x
michal