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 |
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 |
All times are GMT +1. The time now is 12:57 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com