views:

26

answers:

2

Hi,

I developed a excel add ins using VB.NET 2005. and in this when i adding page break below error is occurred :-

This action exceed the number of page breaks you can manually add to a worksheet. a worksheet can contains up to 1026 horizontal page breaks

So can any one suggest how i insert more than 1026 page break or any other solution for do this.

Thanks

Mitesh

+2  A: 

The error message states 'per worksheet', you could split the data into multiple worksheets as well as pages. Although I can't help but wonder why you would want that many page breaks in a spreadsheet...

Dan Iveson
I am printing labels from the excel sheet so i want more then 1024 page breaks.
Mtesh
+1 I agree, I don't see any other way.
Edward Leno
A: 

Excel limits the number of manual page breaks to 1026.

http://support.microsoft.com/kb/284916

The only way around this is with multiple worksheets/workbooks (split your labels into groups of 1026 or less) or store the information in a database and generate dynamically.

If you go with multiple worksheets, you can VBA code to create additional worksheets when the label count gets towards 1026.

Edward Leno