+ Reply to Thread
Results 1 to 3 of 3

Macro to set Page Breaks

  1. #1
    Forum Contributor
    Join Date
    07-12-2018
    Location
    South Africa
    MS-Off Ver
    Office 2021
    Posts
    2,725

    Macro to set Page Breaks

    I have a range name "Journals", which is from S12:X182 on the active sheet.


    I need the code amended so that the page Breaks are at Row 60, 107, 156, and 180, but should allways be one row below "Journal Check" in Col U within the named Range should the range change

    It would be appreciated if someone could assist me

    Please Login or Register  to view this content.
    I have also posted on https://www.mrexcel.com/board/thread...rnals.1235799/

  2. #2
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Exclamation Re: Macro to set Page Breaks


    Already solved in a previous thread ‼

    Why adding such useless object variables ? And you forgot to release them before the procedure ends …


    Anyway the obviously obvious :

    • ResetAllPageBreaks codeline must be after PageSetup codelines.

    • Do not confuse vertical breaks with horizontal breaks ‼
    Last edited by Marc L; 04-26-2023 at 09:20 AM. Reason: typo ?

  3. #3
    Forum Contributor
    Join Date
    07-12-2018
    Location
    South Africa
    MS-Off Ver
    Office 2021
    Posts
    2,725

    Re: Macro to set Page Breaks

    I managed to set the page breaks using this code, where the range per break is > 45 rows and where it is not in the same row as Journal Checks in Col U to extend the break to one row below this

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Macro to Set Page Breaks
    By Howardc1001 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-22-2023, 08:06 AM
  2. Macro to set Page Breaks
    By Howardc1001 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-25-2021, 09:40 AM
  3. Replies: 1
    Last Post: 03-15-2009, 06:08 PM
  4. Hard page breaks being replaced by soft breaks in the wrong place
    By JDavies in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-14-2008, 10:28 AM
  5. Macro Page Breaks
    By Harlequin in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-18-2007, 09:11 AM
  6. Page Breaks Macro
    By Brian Matlack in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-15-2006, 04:49 PM

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