Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Excel: how to insert page breaks between all the rows at once?
|
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Kim,
Here is a macro that will accomplish what you are asking for. What it does is add a page break on every row for all used cells. Go to VBA (ToolsMacroVisual Basic Editor) and create a new Module for the coding (InsertModule) and paste this code in, close VBA. Run the Macro from Excel (ToolsMacroMacrosAdd_PageBreaks) Public Sub Add_PageBreaks() Dim xlssheet As Worksheet Set xlssheet = Excel.ActiveSheet Dim x As Long Dim y As Long Dim actcell As String y = xlssheet.UsedRange.Rows.Count For x = 2 To y actcell = "$A$" & x xlssheet.Range(actcell).Select ActiveWindow.SelectedSheets.HPageBreaks.Add befo=ActiveCell Next End Sub -- --Thomas [PBD] Working hard to make working easy. "Kim" wrote: Excel: how to insert page breaks between all the rows at once? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I insert multiple page breaks simultaneously in Excel? | Excel Discussion (Misc queries) | |||
How do I insert page breaks in a huge EXCEL file? | Excel Discussion (Misc queries) | |||
insert an excel sheet into a word doc and keep excel page breaks. | Excel Discussion (Misc queries) | |||
How do I insert page breaks in .txt for use in excel? | Excel Discussion (Misc queries) | |||
Auto insert page breaks in Excel, based on a sort of numbers | Excel Discussion (Misc queries) |