#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
I can't move my page breaks in Page Break Preview btaft Excel Discussion (Misc queries) 6 April 27th 23 11:49 AM
When automatic page breaks are moved each cell becomes a new page Queso hotmail com> Excel Discussion (Misc queries) 0 March 30th 10 03:08 AM
Vertical page breaks won't drag in Page Break Preview Caroline Excel Discussion (Misc queries) 0 July 14th 09 12:19 PM
How do I do page breaks when view menu doesnt page break preview HeatherF55 Excel Discussion (Misc queries) 0 September 21st 07 04:24 AM
Page Breaks- Printing selected rows on same page ToddEZ Excel Discussion (Misc queries) 1 July 18th 07 04:38 PM


All times are GMT +1. The time now is 08:31 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"