Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Inserting Page Breaks every 40 lines...
Hello all,
I would like to be able to insert a page break every 40 lines of a large file. Is this possible either through add-ins or via VB code? Any help is appreciated. Thanks, Trevor |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Inserting Page Breaks every 40 lines...
Trevor Hargrove wrote:
Hello all, I would like to be able to insert a page break every 40 lines of a large file. Is this possible either through add-ins or via VB code? Any help is appreciated. Hi, you can use this... I guess you better adapt it to your needs, because it takes a while to add them. 1026 is the max number of linebreaks in a spreadsheet. For i = 1 To 1026 ActiveWindow.SelectedSheets.HPageBreaks.Add _ Befo=Cells(i * 40 + 1, 1) Next i At least this should get you started. It would be better if you add some code to detect when the data has ended. Regards, -- Beto Reply: Erase between the dot (inclusive) and the @. Responder: Borra la frase obvia y el punto previo. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Inserting automatic page breaks | Excel Discussion (Misc queries) | |||
Inserting page breaks | Excel Worksheet Functions | |||
Inserting Page Breaks | Excel Discussion (Misc queries) | |||
inserting multiple page breaks at one time | Excel Discussion (Misc queries) | |||
Inserting Page Breaks | Excel Discussion (Misc queries) |