Is there a quick way to page breaks through out 25,000 line sheet

  • Thread starter Thread starter Stacy
  • Start date Start date
S

Stacy

I need to place bage breaks in specific places on a sheet that has 25,000
lines. Is there an easy way to do this?
 
1) Type all row numbers where you want to declare Page-Break.
2) Copy/Paste the following macro to the VB Editor.
3) Select the range of cells and run that Macro.
---------------------------------------
Sub AddPageBreaks()
For Each CL In Selection
Cells(CL + 1, 1).Select
ActiveWindow.SelectedSheets.HPageBreaks.Add Before:=ActiveCell
Next
[A1].select
End Sub
 
I'm not sure I made myself clear enough...
What I meant was:
* Type all the row numbers - where you want the Page-Break - into a range of
adjacent cells.
[If you need 25 page breaks - type the 25 row numbers into 25 cells - like:
F1:F25 or any other range].
* Select those 25 cells and run the Macro.
Micky


מיכ×ל (מיקי) ×בידן said:
1) Type all row numbers where you want to declare Page-Break.
2) Copy/Paste the following macro to the VB Editor.
3) Select the range of cells and run that Macro.
---------------------------------------
Sub AddPageBreaks()
For Each CL In Selection
Cells(CL + 1, 1).Select
ActiveWindow.SelectedSheets.HPageBreaks.Add Before:=ActiveCell
Next
[A1].select
End Sub
-------------------
Micky


Stacy said:
I need to place bage breaks in specific places on a sheet that has 25,000
lines. Is there an easy way to do this?
 
Back
Top