Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Page breaks
I have an application that generates Excel spreadsheets. I am trying to
determine how many pagebreaks there are in the spreadsheet using the code _wksht.HPagebreaks.Count. The problem is, this does not always seem to be accurate. There are no vertical page breaks in my spreadsheet. There are also no manual page breaks in the spreadsheet. In fact, I call ResetAllPageBreaks() before getting the count. One example has three pages (thus, 2 page breaks), but the HPagebreaks.Count returns 1. Is there any reason for this? Is there something in my spreadsheet I should look for so that an accurate page break count is returned? Any help would be greatly appreciated! Thanks! Theresa Smallwood |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Page breaks
Theresa,
Have you set PrintArea ? Sure _wksht refers to the expected sheet ? Why use a "_" as the first character of your object ? Does that not mean "hide" to VB/VBA ? NickHK "Theresa Smallwood" wrote in message ... I have an application that generates Excel spreadsheets. I am trying to determine how many pagebreaks there are in the spreadsheet using the code _wksht.HPagebreaks.Count. The problem is, this does not always seem to be accurate. There are no vertical page breaks in my spreadsheet. There are also no manual page breaks in the spreadsheet. In fact, I call ResetAllPageBreaks() before getting the count. One example has three pages (thus, 2 page breaks), but the HPagebreaks.Count returns 1. Is there any reason for this? Is there something in my spreadsheet I should look for so that an accurate page break count is returned? Any help would be greatly appreciated! Thanks! Theresa Smallwood |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Page breaks
Yes, I have set the print area.
The application is written in C#, so the underscore character is valid. And yes, the _wksht does refer to the correct sheet. Theresa *** Sent via Developersdex http://www.developersdex.com *** |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
I can't move my page breaks in Page Break Preview | Excel Discussion (Misc queries) | |||
When automatic page breaks are moved each cell becomes a new page | Excel Discussion (Misc queries) | |||
Vertical page breaks won't drag in Page Break Preview | Excel Discussion (Misc queries) | |||
How do I do page breaks when view menu doesnt page break preview | Excel Discussion (Misc queries) | |||
Page Breaks- Printing selected rows on same page | Excel Discussion (Misc queries) |