Hi,
I'd like to know if there's a way (using VBA) to get the total number of pages of a sheet?
I've tried difference variations of this code:
HorizBreaks = Worksheets(1).HPageBreaks.Count
HPages = HorizBreaks + 1
VertBreaks = Worksheets(1).VPageBreaks.Count
VPages = VertBreaks + 1
NumPages = HPages * VPages
and it still doesn't work. Any help you can give me would be greatly appreciated.
I'd like to know if there's a way (using VBA) to get the total number of pages of a sheet?
I've tried difference variations of this code:
HorizBreaks = Worksheets(1).HPageBreaks.Count
HPages = HorizBreaks + 1
VertBreaks = Worksheets(1).VPageBreaks.Count
VPages = VertBreaks + 1
NumPages = HPages * VPages
and it still doesn't work. Any help you can give me would be greatly appreciated.