+ Reply to Thread
Results 1 to 2 of 2

Horizontal Page Breaks Problem

  1. #1
    Registered User
    Join Date
    03-10-2015
    Location
    England
    MS-Off Ver
    2010
    Posts
    3

    Horizontal Page Breaks Problem

    I have a spreadsheet that I need to print as a two page document but the first page will consist of a variable number of rows (others being hidden).

    I want the page break to occur at a specific row reference (257) but I'm having problems with the code - it either seems to ignore the command and puts the page break where it want to or returns an error code.
    Sometimes I think I have it working only to close, re-open and find that I still have an error.

    Code is as follows:
    Please Login or Register  to view this content.
    Thanks

  2. #2
    Registered User
    Join Date
    03-10-2015
    Location
    England
    MS-Off Ver
    2010
    Posts
    3

    Re: Horizontal Page Breaks Problem

    I'd really appreciate any thoughts on this as it's now starting to drive me crazy!!

    I've tried all sorts of combinations of using
    ActiveSheet.HPageBreaks.Add before:=ActiveSheet.Cells(257, 1)
    Set ActiveSheet.HPageBreaks(1).Location = Cells(257, 1)
    Including using Range.cells(A257) and/or using row descriptor etc,
    forcing breaks to manual using xlPageBreakManual
    etc etc

    but nothing seems to do the trick.

    It is easy to do manually - set to print 1 page wide by 2 page tall then in page break preview slide the assigned page break to where I want it - why is it so complicated to do it in code?

    Thanks

+ 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. Count Horizontal Page Breaks
    By shudder in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 12-08-2010, 01:37 AM
  2. Replies: 1
    Last Post: 03-15-2009, 06:08 PM
  3. Printing Problem (Page Breaks)
    By SamuelT in forum Excel General
    Replies: 1
    Last Post: 08-22-2008, 06:49 AM
  4. horizontal page breaks
    By Santhosh Kumar in forum Excel General
    Replies: 1
    Last Post: 06-25-2005, 10:05 AM
  5. Horizontal page breaks
    By sonic in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-16-2005, 07:42 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