Insert Page Break Question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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 Before:=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...
 
I am using XL2000 and your code is working for me. What kind of errors do you
get?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top