I am trying to manipulate the horizontal page breaks in an Excel 2007 spreadsheet through VBA. The line of code I am using is:
For a = 1 To sheetcount - 1
ThisWorkbook.Worksheets("Continuation Sheet " & Trim(Str(k + 1))).Range(sheetrange).rows(a * 44).EntireRow.PageBreak = xlPageBreakManual
Next a
The code executes without error but does not move the horizontal page breaks. Any idea what I am doing wrong?
Thanks,
For a = 1 To sheetcount - 1
ThisWorkbook.Worksheets("Continuation Sheet " & Trim(Str(k + 1))).Range(sheetrange).rows(a * 44).EntireRow.PageBreak = xlPageBreakManual
Next a
The code executes without error but does not move the horizontal page breaks. Any idea what I am doing wrong?
Thanks,