+ Reply to Thread
Results 1 to 3 of 3

How can I prevent Excel from adding page breaks??

  1. #1
    Registered User
    Join Date
    05-25-2016
    Location
    Hollywood, CA
    MS-Off Ver
    2016
    Posts
    79

    How can I prevent Excel from adding page breaks??

    At times, I become quite annoyed at having to go thru the ol' File > Options > Advanced > Clear checkbox for "Show page breaks" routine after Excel has put in dashed lines on worksheets that didn't have them last time I looked. Is there any way to prevent this? Does anyone have this problem besides me? What causes Excel to do this?

  2. #2
    Forum Contributor
    Join Date
    03-05-2013
    Location
    Sydney
    MS-Off Ver
    Excel 2010
    Posts
    301

    Re: How can I prevent Excel from adding page breaks??

    Im not sure that I understand exactly, however, the dash lines are based on either selection you previous made, or the default print settings (paper size, margins, ect).
    1. In Excel, go to the Page Layout tab.
    2. Click Print Area
    3. Select Clear Print Area.

    This will reset to the default print settings.

  3. #3
    Valued Forum Contributor
    Join Date
    11-15-2010
    Location
    Dallas, TX
    MS-Off Ver
    Excel 2003
    Posts
    538

    Re: How can I prevent Excel from adding page breaks??

    One idea is VBA:
    ActiveSheet.DisplayAutomaticPageBreaks = False

    but note that it is sheet specific. You might want to loop through all sheets, such as
    for each ws in worksheets

    but even that is imperfect because you may add more sheets and you also have to remember to run it whenever you create or open workbooks. Nonetheless maybe it will at least be less work for you to go Alt-a and get all sheets in the active workbook (or all open workbooks) via a UDF, vs. manually clicking the option every time. Further timesaving might be achieved by putting that into App_NewWorkbook and App_WorkbookOpen; if I'm not mistaken, then you might almost not have to go into the option ever. (Edit: Adding a worksheet may require manual action. I can't remember if there is an event for sheets.add . You also might want to determine if copying sheets preserves the setting.)
    Last edited by Oppressed1; 04-26-2017 at 02:55 AM.

+ 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] Automatically adding Page Breaks after nth row
    By Mansfieldexcel in forum Excel General
    Replies: 7
    Last Post: 05-03-2016, 05:57 AM
  2. VBA code and Adding dynamic Page Breaks
    By scott micklo in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-15-2016, 03:11 PM
  3. Adding page breaks based on cell contents
    By WasWodge in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-30-2010, 10:55 PM
  4. Prevent automatic page breaks?
    By proepert in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-06-2010, 07:08 AM
  5. Prevent page breaks in subtotaled rows.
    By weatherman422 in forum Excel General
    Replies: 0
    Last Post: 09-17-2008, 10:02 AM
  6. Adding Page Breaks
    By winshent in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-08-2008, 08:50 AM
  7. Adding Page Breaks
    By tis_r in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-17-2005, 07:27 PM

Tags for this Thread

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