Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Don
 
Posts: n/a
Default 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   Report Post  
Martin
 
Posts: n/a
Default

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Page scaling & Page break preview prob Martin ©¿©¬ @REMOVETHIS.plus.com Excel Discussion (Misc queries) 1 July 17th 05 09:10 PM
Insert Page Break Don Excel Discussion (Misc queries) 3 June 9th 05 08:32 PM
adding a new page break to an existing page break Edward Letendre Excel Discussion (Misc queries) 1 March 6th 05 09:29 AM
Page Break View - not the usual question Rose Excel Discussion (Misc queries) 0 March 2nd 05 03:25 PM
content does not stay in page break notexcellent Excel Worksheet Functions 1 February 13th 05 05:55 AM


All times are GMT +1. The time now is 04:38 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"