Re: Help on VBA Page Breaks

Tech-Archive recommends: Speed Up your PC by fixing your registry



If the 2nd and 3rd *** should be set up by like the first, then

ActiveCell.Offset(90, 0).Select

should be

ActiveCell.Offset(34, 0).Select

--
Regards,
Tom Ogilvy


"Apollyon" <pshuster@xxxxxxxxxxxxx> wrote in message
news:1124223549.947200.166420@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> The macro sets the next address using the "Range.Offset.Select" and
> then uses this saved address to start the next report. It appears that
> when I insert a manual page break and then select the activecell to set
> the starting range that the effect of inserting the page break has
> changed the stored address for the beginning of the next report. Here
> is a snipet of the code I am using:
>
> ' Build first manifold report
> If i = 1 Then
> Range("A274").Select
> ManifoldHeaderRange.Copy ActiveCell
> Manifold_General_InspectRange.Copy ActiveCell.Offset(18, 0)
> Range("A330").Select
> ActiveCell.PageBreak = xlPageBreakManual
> Range("A364").Select
> Set NextAddress = ActiveCell
> ActiveCell.PageBreak = xlPageBreakManual
> ManifoldReport_Pointer = ManifoldReport_Pointer + 1
> Else
> NextAddress.Select
> ManifoldHeaderRange.Copy ActiveCell
> Manifold_General_InspectRange.Copy ActiveCell.Offset(18, 0)
> ActiveCell.Offset(56, 0).Select
> ActiveCell.PageBreak = xlPageBreakManual
> ActiveCell.Offset(90, 0).Select
> Set NextAddress = ActiveCell
> ActiveCell.PageBreak = xlPageBreakManual
> ManifoldReport_Pointer = ManifoldReport_Pointer + 1
> End If
>


.


Quantcast