+ Reply to Thread
Results 1 to 4 of 4

Sub ChangePrintArea()

  1. #1
    Registered User
    Join Date
    01-19-2014
    Location
    Budapesta
    MS-Off Ver
    Excel 2003
    Posts
    2

    Post Sub ChangePrintArea()

    Hello Guys,

    I need some help from you. I set the next code for printing conditional pages from 1 Sheet, and it is not selct the pages after conditions.
    The cod is :
    Please Login or Register  to view this content.
    Thx in advance.
    Last edited by vlady; 01-21-2014 at 04:15 AM.

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,607

    Re: Sub ChangePrintArea()

    At a glance - it looks right.
    May be ...
    * in BXX you have texts not numbers? (they can look similar) ?
    * "82 B1" is wrong name?
    * your Sub ChangePrintArea() is in the worksheet code (shall be in standard module)

    A good advice from http://www.excelforum.com/forum-rule...rum-rules.html is:
    Post a workbook.

  3. #3
    Registered User
    Join Date
    01-19-2014
    Location
    Budapesta
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Sub ChangePrintArea()

    In attach you find my file.
    Thx

    Attachment 291775
    Attached Files Attached Files

  4. #4
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,607

    Re: Sub ChangePrintArea()

    You have not tried TWO of my advices - both true:
    Quote Originally Posted by Kaper View Post
    * "82 B1" is wrong name?
    * your Sub ChangePrintArea() is in the worksheet code (shall be in standard module)
    See attachment.
    In the code of FORM sheet only
    Please Login or Register  to view this content.
    If you wish the print area to be decreased after some data is deleted - delete also line from the code (as the comment states).

    In standard Module only:
    Please Login or Register  to view this content.
    Note, that I used right name for the worksheet!

    For sure, the code above could be rewritten in more effective or more elegant way, but it works. So I leave it as is.
    Attached Files Attached Files

+ 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