+ Reply to Thread
Results 1 to 6 of 6

Print area

  1. #1
    Forum Contributor
    Join Date
    10-05-2014
    Location
    CALIFORNIA
    MS-Off Ver
    2010
    Posts
    1,719

    Print area

    Hello

    I am trying to set a print area from A1:L5000. But everytime I do the “clear print area” it includes the column M, N, P and Q. I can’t figure it out just to set it from A1:L. I did reset the scaling to 82 but still does the same.

    As you can you see on my sample that the A17:L thru A77:L are gray. If there is no entry then it should gray color.

    Can you please add code in the VBA on the attachment I have attached.

    Thank you.
    Attached Files Attached Files

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,696

    Re: Print area

    I am having trouble understanding your problem statement.

    • Why are you doing "clear print area" if you are trying to set print area?
    • Scaling is unrelated to print area.
    • Your print area is currently set to 'FEBRUARY 2021'!$A$1:$L$16.
    • Your VBA does not do anything with the print area, not sure how your VBA relates to your question.
    • I set your print area to A1:L5000 with no problem. See attached.
    Attached Files Attached Files

  3. #3
    Forum Contributor
    Join Date
    10-05-2014
    Location
    CALIFORNIA
    MS-Off Ver
    2010
    Posts
    1,719

    Re: Print area

    Hi,
    That is not exactly what I wish to do.

    I have been having an issue about setting a print area on some of my worksheets. Sometimes I was able to set it right but with this one I am having trouble with because I prints it includes where the P2/P3.
    In the sample worksheet. As you can see A17-A77 were gray out that is should not be.
    Let say I want to set the print area from A1:L5000. If I do an entry from A1:L77 then this only should be printed the rest will be gray out. If I add an entry to A77 then it should not be gray out and if I delete the entry in A77:L77 then is should be gray out. Although, I have an entry on P2 and P3.

    I Just want to print where there only entry from A1:L5000 which does not include P2/P3.


    Thanks.

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,696

    Re: Print area

    It's still not clear what you want to do. Here is a slightly different version where I set the print area to A:L. It will only print the rows that are in use. I don't know what you mean by "gray out" because nothing in your file is grayed out. I don't see how P2 and P3 come into play because they are outside the print area.
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    10-05-2014
    Location
    CALIFORNIA
    MS-Off Ver
    2010
    Posts
    1,719

    Re: Print area

    ok.. thank you.

  6. #6
    Forum Contributor
    Join Date
    10-05-2014
    Location
    CALIFORNIA
    MS-Off Ver
    2010
    Posts
    1,719

    Re: Print area

    Hi,

    Thanks.
    Last edited by RJ1969; 02-12-2021 at 12:56 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. Set print area of selected range then print preview if ok then print the document!
    By HaroonSid in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-01-2014, 07:10 AM
  2. Macro - Set Print Area for Changing Data Area
    By ksp in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-27-2013, 04:19 AM
  3. Replies: 1
    Last Post: 02-12-2013, 12:16 PM
  4. VBA to set print range, open box asking for print qty, print, then redefine print area
    By galvinpaddy in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-11-2012, 06:43 PM
  5. Replies: 8
    Last Post: 05-23-2007, 06:39 AM
  6. Replies: 4
    Last Post: 10-08-2005, 03:05 PM
  7. Print Area:What would be the code for setting the print area
    By wammer in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-02-2005, 02:05 AM

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