+ Reply to Thread
Results 1 to 1 of 1

Hard page breaks being replaced by soft breaks in the wrong place

  1. #1
    Registered User
    Join Date
    10-29-2008
    Location
    Earth
    Posts
    14

    Hard page breaks being replaced by soft breaks in the wrong place

    I am writing a suite of files. Initially, there are just two, a control file and a model. The control file has macros which run through every business unit and create a customised version of the model. This works fine, producing a few dozen files. Printouts are needed from these, and again the control file has macros to run through them all or through subsets. However, the print area on each sheet may be reduced by two columns for some prints. Again, this works fine, except that when the width is reduced, I lose my hard page break. It's important that the page break go where I want it, and I can't print in two commands because this would prevent the network printer putting the two pages on a single, two sided printed page. So, after changing the width, I try to reset the page break. Since I am using print to fit, I can't see why there should be a problem. The following code lists all the things I have tried. Not all of them work together. sPageBreak (a string) has been initialised with the address where the break should go.

    Please Login or Register  to view this content.
    Using the immediate window, everything appears to work, with the break on row 142 where I want it. But if I reset & look at the file, the hard break on row 142 has gone, and there is a soft break on 140. The same applies when I print - the break is in the wrong place. If I don't reduce the print area by 2 columns, the hard break in the model remains where I put it and the printout looks fine, so it's certainly possible for Excel to put the rows I want on the first page.

    Thoughts on what I might have missed would be greatly appreciated.

    Regards,

    John Davies
    Last edited by JDavies; 11-17-2008 at 08:40 AM. Reason: Typo: s/are/area

+ 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