+ Reply to Thread
Results 1 to 2 of 2

Printing a sheet with a line boarder - like MS Word will do.

  1. #1
    Registered User
    Join Date
    02-11-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    8

    Question Printing a sheet with a line boarder - like MS Word will do.

    My file has two sheets. Data entry on sheet1 determines what rows on sheet2 are hidden or unhidden (These changes are made with a macro). Sheet2 is printed at 100% under page setup. Sheet2 may be half a page, a whole page or more than a page - maybe two pages. I am needing a macro that will allow the contents of sheet2 to print with a line border (like MS Word would do), preferable with two lines around the border. Is this possible?

    Thank you for your help.

  2. #2
    Valued Forum Contributor smuzoen's Avatar
    Join Date
    10-28-2011
    Location
    Brisbane, Australia
    MS-Off Ver
    Excel 2003/2007/2010
    Posts
    610

    Re: Printing a sheet with a line boarder - like MS Word will do.

    This will produce a double line border around the data in Sheet2 - Sheet2 can be half a page or 20 pages - it will determine the number of pages and place borders around all the sheets. Hopefully this is what you are after. Place this into a module and run the macro BorderPages
    Please Login or Register  to view this content.
    Hope this helps.
    Anthony
    Pack my box with five dozen liquor jugs
    PS: Remember to mark your questions as Solved once you are satisfied. Please rate the answer(s) by selecting the Star in the lower left next to the Triangle. It is appreciated?

  3. #3
    Registered User
    Join Date
    02-11-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Printing a sheet with a line boarder - like MS Word will do.

    I added a 2nd module and placed code provided inside. I run it. A1 on sheet2 is the only cells on sheet2 that has double line borders.

    Additional info about sheet2:
    -Column A does not contain anything
    -I have Merge & Center cells on sheet2
    -I have Merged cells that span multiple columns and rows and that are wrapped
    -all data shown on sheet2 is found in columns B through I
    -J is the last column. It is blank and is used only for presentation purposes
    -the left side of the border will always the left side of column A.
    -The right side of the border will always be the right side of column J
    -The top side of the border will always be the top part of row 1
    -The bottom side of the border is the problem. It will always be moving and is dependent on what is entered in Sheet1. If the data goes past the 1st page when printed, I need the border to be around page 1 and page 2 - from top to bottom. (I hope this makes sense)

    Some more info:
    The code that I have in module1 is this: (Note that "_CADD3" is D7 on sheet1, "_CREFUND" is D15 on sheet1, "_COWED" is D17 on sheet1. I hope this helps.)
    Please Login or Register  to view this content.
    Thank you.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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