+ Reply to Thread
Results 1 to 2 of 2

Page Breaks when data is NOT on column "A"

  1. #1
    BEEJAY
    Guest

    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. #2
    Forum Contributor
    Join Date
    01-21-2005
    Location
    Colorado
    MS-Off Ver
    2000,2003,2007
    Posts
    481
    Try using the Horizontal Page Break rather than just the xlPageBreakManual

    xlHPageBreaks.Add

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1