Results 1 to 4 of 4
  1. #1
    New Lounger
    Join Date
    May 2004
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Help with a VBA Print Range Code Problem (2000)

    I am using the code listed below to automatically set my print ranges on my reports. The problem I am having is that if the document has no page breaks, the code works great, however if the report is Sub-Totaled and placing a page break in the document the code below will only print the first page.

    Any example, I have a document that have information for Buyers 1 through 10. I want to have a separate page for each buyer, so I Subtotal by Buyer and Check

  2. #2
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Help with a VBA Print Range Code Problem (2000)

    The code as written does not print it only sets the print range on each sheet. The page breaks should not affect this.

    What/How are you printing? Could you attach a "sample" workbook demonstrating the problem (remove any proprietary info)?

    Steve

  3. #3
    New Lounger
    Join Date
    May 2004
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Help with a VBA Print Range Code Problem (2000)

    Steve,

    Sorry I understand that the Code only sets the print Ranges (forgot to mention that). The Document is created by doing a Sub total and Clicking on "Page Break" by group. When the code runs on a Call in the Reports Code the SetPrintRanges Call Sub does not completely cover the entire amount of the report. I then must go into the Print Preview, Page Break and manually adjust the Print Range. If you would like a copy of the file I would be happy to e-mail it to you, however it is to large to post it here.

    Hope this gives you more information.


    Thanks



    Jack

  4. #4
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Help with a VBA Print Range Code Problem (2000)

    You should be able to make a simple example that you can post (100 k max)

    I don't completely understand why you need to manually adjust the page breaks or why the print range is a problem. It adjusts based on for empty columns in a row or 4 empty rows. Perhaps you need a new way to set the range (though without seeing it I do not know what you are after)

    Steve

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •