Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Page Break: Format Row
In the following macro I have inserted a print preview to reset the
horizontal page break counter in the spreadsheet. Without this accomodation I can only run the macro once. The second time I run it, I get an out of range error. Is there another way to reset the horizontal page break so that each time the macro runs it starts recognizing the horizontal page breaks from the beginnging of the spreadsheet? Sub LineFormatAtPageBreak() Dim oHPgbr As HPageBreak ActiveWindow.SelectedSheets.PrintPreview For Each oHPgbr In ActiveSheet.HPageBreaks MsgBox "Other row page break at:" & oHPgbr.Location.Address ' Format row at page break Next End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 2007 Page Break Adjustments causes a page break each cell | Excel Worksheet Functions | |||
How do I do page breaks when view menu doesnt page break preview | Excel Discussion (Misc queries) | |||
change and/or remove page number watermark in page break preview | Excel Discussion (Misc queries) | |||
Hiding the page number in page break preview background. | Excel Discussion (Misc queries) | |||
adding a new page break to an existing page break | Excel Discussion (Misc queries) |