Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Idiot can't insert page breaks.
Perhaps not an idiot but, I've hit a brick wall trying to insert a page
break with code. The problem 300 plus rows of data requiring splitting when data in a certain row chages. On change, insert new line, create a heading summarising data below, format the heading and insert a page break Kept getting getting no result trying different method with HPageBreak. Examples ActiveSheet.HPageBreaks.Add Befo=Activecell.offset(1) Selection.offset(1).select ActiveSheet.HPageBreaks.Add Befo=Activecell Selection.offset(-1).select No problem thinks I. Just record a macro and copy code from there. Steps: start recorder: Clear all breaks Select cell Insert page break stop recorder The recorder generated code but, in pagebreak view I could not see any break inserted. In print preview, ditto. Started gettiing annoyed by now. Tried manually dragging breaks into pagebreak view. Voila. Lines appear. However, the breaks don't appear in print preview. Just tested code at home. You guessed it. Breaks appear. What may be causing the lack of breaks in Excel at work? Page setup, perhaps? What's the best method to insert a break away from the selected cell? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Idiot can't insert page breaks.
Idiot recovers the power of thought:
With ActiveSheet.PageSetup .... .FitToPagesTall = False .... End With "Steve" <No Spam wrote in message ... Perhaps not an idiot but, I've hit a brick wall trying to insert a page break with code. The problem 300 plus rows of data requiring splitting when data in a certain row chages. On change, insert new line, create a heading summarising data below, format the heading and insert a page break Kept getting getting no result trying different method with HPageBreak. Examples ActiveSheet.HPageBreaks.Add Befo=Activecell.offset(1) Selection.offset(1).select ActiveSheet.HPageBreaks.Add Befo=Activecell Selection.offset(-1).select No problem thinks I. Just record a macro and copy code from there. Steps: start recorder: Clear all breaks Select cell Insert page break stop recorder The recorder generated code but, in pagebreak view I could not see any break inserted. In print preview, ditto. Started gettiing annoyed by now. Tried manually dragging breaks into pagebreak view. Voila. Lines appear. However, the breaks don't appear in print preview. Just tested code at home. You guessed it. Breaks appear. What may be causing the lack of breaks in Excel at work? Page setup, perhaps? What's the best method to insert a break away from the selected cell? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I insert page breaks in .txt for use in excel? | Excel Discussion (Misc queries) | |||
Insert Multiple Page Breaks | Excel Worksheet Functions | |||
insert page breaks | Excel Programming | |||
insert page breaks | Excel Programming | |||
insert page breaks every 43 lines | Excel Programming |