I actually had a line of code that worked just fine Excel 2003 VBA, but am currently pulling my hair off as the line gives an error in 2010 VBA.
Basically, I want to be able to have the first several pages'(until the "PageNum"-th page) pagebreak to be specifically set. After that, I want the PageNum-th page to be all encompassing until the lastrow of the data.
I used to use the function ActiveSheet.HPageBreaks().Location which seems to play a different role in 2010.
For example I have,
ActiveSheet.HPageBreaks(PageNum).Location = Range("A" & LastRowNumber)
Could anyone kindly help me solve this issue please?
thanks!
Basically, I want to be able to have the first several pages'(until the "PageNum"-th page) pagebreak to be specifically set. After that, I want the PageNum-th page to be all encompassing until the lastrow of the data.
I used to use the function ActiveSheet.HPageBreaks().Location which seems to play a different role in 2010.
For example I have,
ActiveSheet.HPageBreaks(PageNum).Location = Range("A" & LastRowNumber)
Could anyone kindly help me solve this issue please?
thanks!