Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Insert Page Break Question
Earlier today, I was given code to insert an automatic page break. I am
using Office 2003. The code was: Sub Macropagebreak() For Each CELL In Range("A:A") If CELL = "1" Then CELL.Rows.Select ActiveWindow.SelectedSheets.HPageBreaks.Add Befo=ActiveCell Else End If Next End Sub My question is this. This worked fine on Excel 2003. When I tried to use it on Excel 2000, the code would not work. Is there a different way to do this in earlier versions of Excel? Thanks... -- Don Rountree |
#2
|
|||
|
|||
I am using XL2000 and your code is working for me. What kind of errors do you
get? -- Regards, Martin "Don" wrote: Earlier today, I was given code to insert an automatic page break. I am using Office 2003. The code was: Sub Macropagebreak() For Each CELL In Range("A:A") If CELL = "1" Then CELL.Rows.Select ActiveWindow.SelectedSheets.HPageBreaks.Add Befo=ActiveCell Else End If Next End Sub My question is this. This worked fine on Excel 2003. When I tried to use it on Excel 2000, the code would not work. Is there a different way to do this in earlier versions of Excel? Thanks... -- Don Rountree |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Page scaling & Page break preview prob | Excel Discussion (Misc queries) | |||
Insert Page Break | Excel Discussion (Misc queries) | |||
adding a new page break to an existing page break | Excel Discussion (Misc queries) | |||
Page Break View - not the usual question | Excel Discussion (Misc queries) | |||
content does not stay in page break | Excel Worksheet Functions |