Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 247
Default Page Breaks when data is NOT on column "A"

The following works great EXCEPT it needs to put the
break in column A, NOT in B.
Help Please.
BeeJay

Dim OldVal As String
Dim Rng As Range
With Application
.Calculation = xlManual
.ScreenUpdating = False
End With
OldVal = Range("B1")
StartTime = Timer
For Each Rng In Range("B1:B10000") '<< change range

If Rng.Text < OldVal Then
Rng.PageBreak = xlPageBreakManual
OldVal = Rng.Text
End If
Next Rng

MsgBox Timer - StartTime

With Application
.Calculation = xlAutomatic
.ScreenUpdating = True
End With

MsgBox "COMPLETE!"

End Sub

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Page Breaks when data is NOT on column "A"


Try using the Horizontal Page Break rather than just th
xlPageBreakManual

xlHPageBreaks.Ad

--
bhofset
-----------------------------------------------------------------------
bhofsetz's Profile: http://www.excelforum.com/member.php...fo&userid=1880
View this thread: http://www.excelforum.com/showthread.php?threadid=38129

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
Create Pivot Table Data with Column "Sum" rather than "count" defa Johnny_99[_2_] Excel Discussion (Misc queries) 2 January 2nd 10 03:25 PM
"manual page breaks error" Dee Excel Worksheet Functions 5 June 20th 07 10:18 PM
"Print Selection" doesn't print beyond automatic page breaks Andre Excel Discussion (Misc queries) 3 October 30th 06 09:30 PM
Change data in a single column from "last, first" to "first last" Jeanne Excel Discussion (Misc queries) 2 March 27th 06 08:40 PM
Adding "New" "Insert" "Delete" into a workbook to change from data 1 to data 2 etc Bob Reynolds[_2_] Excel Programming 0 March 4th 04 08:52 PM


All times are GMT +1. The time now is 12:49 AM.

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"