+ Reply to Thread
Results 1 to 3 of 3

New Problem on print area

  1. #1
    Registered User
    Join Date
    11-25-2014
    Location
    Michigan
    MS-Off Ver
    2003
    Posts
    15

    New Problem on print area

    On a prior post I wanted to set print area based on the value in a cell, Leith Ross gave me the answer to that problem but, I didn't notice until I marked it solved that when printing out the report part of the print area did not print it cuts off about 1/2 inch of the report and on the print preview it looks correct. This is what Leith wrote:

    Sub Macro2a()

    Dim Item As Variant
    Dim PrintRng As Range
    Dim Wks As Worksheet

    Set Wks = Worksheets("Master Control")

    If Wks.Range("B136") > 1 Then Set Rng = Wks.Range("A1:V159"): GoTo StartPrinting
    If Wks.Range("B96") > 1 Then Set Rng = Wks.Range("A1:V119"): GoTo StartPrinting
    If Wks.Range("B53") > 1 Then Set Rng = Wks.Range("A1:V76"): GoTo StartPrinting
    If Wks.Range("B12") > 1 Then Set Rng = Wks.Range("A1:V39")

    If Rng Is Nothing Then Exit Sub

    StartPrinting:

    Wks.PageSetup.PrintArea = Rng.Address
    Wks.PrintOut Copies:=1, Collate:=True
    Wks.PageSetup.PrintArea = ""

    For Each Item In Array("Jack Pot", "Card Accountability", "CGT Acct", "Cash Accountability")
    Set Wks = Worksheets(Item)
    Wks.PrintOut Copies:=1, Collate:=True
    Next Item

    End Sub

    It is the correct area but does not print correctly any ideas.

  2. #2
    Registered User
    Join Date
    10-10-2015
    Location
    Hoboken, Antwerp, Belgium
    MS-Off Ver
    2010
    Posts
    93

    Re: New Problem on print area

    Hi,

    The only error I see is that this code is not correct:
    Please Login or Register  to view this content.
    Must be:
    Please Login or Register  to view this content.
    because the declaration is:
    Please Login or Register  to view this content.
    Greetings,

    Cheetahke

  3. #3
    Registered User
    Join Date
    11-25-2014
    Location
    Michigan
    MS-Off Ver
    2003
    Posts
    15

    Re: New Problem on print area

    I found the problem. I just had to set the print area one cell wider then it works correctly.

    Thanks for the response

+ 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] Print Area Problem
    By pdizzy in forum Excel General
    Replies: 3
    Last Post: 10-09-2013, 12:21 PM
  2. Problem with Print Area
    By mike703 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-04-2013, 01:43 PM
  3. Replies: 1
    Last Post: 02-12-2013, 12:16 PM
  4. Replies: 8
    Last Post: 05-23-2007, 06:39 AM
  5. Print or Print Area problem.
    By icetrey in forum Excel General
    Replies: 2
    Last Post: 03-19-2007, 02:35 AM
  6. Replies: 4
    Last Post: 02-17-2006, 08:36 AM
  7. [SOLVED] Set print area problem
    By Philip Reece-Heal in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-14-2006, 04:15 PM
  8. print area problem
    By Mark in forum Excel General
    Replies: 1
    Last Post: 02-13-2005, 07:06 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