+ Reply to Thread
Results 1 to 8 of 8

Sheet Properties Non Printing

  1. #1
    Registered User
    Join Date
    10-17-2014
    Location
    Plymouth, ma
    MS-Off Ver
    2010
    Posts
    30

    Sheet Properties Non Printing

    I have a workbook with multiple sheets. Is there a way to designate an entire sheet as non printing, even if you select print entire workbook ?
    the last page of the workbook is a change log and does not need to be printed

    Thanks


    Steve

  2. #2
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: Sheet Properties Non Printing

    Hi,

    Have a look at this thread, which might help you:
    http://www.excelforum.com/excel-prog...worksheet.html

    Regards,
    Aardigspook

    If your problem is solved, please go to 'Thread Tools' on your first post and 'Mark Thread as Solved'.
    You don't need to give me rep if I helped, but thanks are appreciated.

  3. #3
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Sheet Properties Non Printing

    I tested this and it worked out.

    I added the following code to ThisWorkbook in VB Editor (Alt+F11):

    Please Login or Register  to view this content.
    This printed all sheets except for the last sheet.
    Make Mom proud: Add to my reputation if I helped out!

    Make the Moderators happy: Mark the Thread as Solved if your question was answered!

  4. #4
    Registered User
    Join Date
    10-17-2014
    Location
    Plymouth, ma
    MS-Off Ver
    2010
    Posts
    30

    Re: Sheet Properties Non Printing

    Wow,

    That was quick. I always try to do a search first but if you don't word it exactly ......

    So I see this code form the other post:

    Sub Prntouts()
    Dim ws As Worksheet
    For Each ws In ThisWorkbook.Worksheets
    If ws.Visible = xlSheetVisible And _
    ws.Name <> "HotKey Codes" Then ws.PrintOut
    Next ws

    End Sub

    I don't use VBA code frequently enough to know good code from bad, Does this look like it will work ? / I should just be able to edit the sheet name "HotKey Codes" and be good

    Thanks


    Steve

  5. #5
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Sheet Properties Non Printing

    You gotta follow the RULES Use code tags around code.
    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.
    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here


    As for the code itself, it should work just fine, but you'd still need to use some Event trigger to prevent the normal print function from occuring.
    You always just edit the string in the code to match the worksheet name you're using in your actual workbook.

    On ThisWorkbook:
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    If I had an index as the very last sheet that I didn't want printed, and I named it Kitten_Explosion I could just alter the code as I did above.
    Last edited by daffodil11; 07-28-2015 at 11:48 AM.

  6. #6
    Registered User
    Join Date
    10-17-2014
    Location
    Plymouth, ma
    MS-Off Ver
    2010
    Posts
    30

    Re: Sheet Properties Non Printing

    Sorry about that, I'll remember to use the code tags on the next go around
    I wish I had more opportunities to work with VBA. it's amazing how powerful it is I just don't use it enough to be comfortable with it yet.

    Thank you for your help.

  7. #7
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Sheet Properties Non Printing

    I taught myself from nothing to a level of reasonable proficiency over the last 18 months, mostly by tinkering and reverse engineering.

    The basic language is easy enough (it doesn't break its own rules, and there are only a few of them), but the real hard part is the extensive object library and item's properties (adjectives) and methods (verbs).

    Here's a hot tip if you have Excel 2010: Go to File->Options->Trust Center->Trust Center Settings...->Privacy Options and deselect the top box for "Connect to Office.Com"

    By doing so, you enable the intrinsic help files that come with the software, and they're pretty dang useful.


    In VB Editor, hit F2, and search for something you're curious about. How about the word "PrintOut" of the Sheets class? Select it and hit the ? or F1. Now you can see all of it in a tidy little help file.

  8. #8
    Registered User
    Join Date
    10-17-2014
    Location
    Plymouth, ma
    MS-Off Ver
    2010
    Posts
    30

    Re: Sheet Properties Non Printing

    Thanks for the tip on the instinctive help, I've set up excel per your instructions. We had an offsite IT guy here that was very good at writing code. He would write the code and explain it as he went along. The company recently spun off his division so I no longer have access to his help. I'm glad I found this forum, it has been very helpful

    Thanks again


    Steve

+ 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. Replies: 0
    Last Post: 07-18-2012, 03:57 AM
  2. Disabling Printing ability of a sheet unless printing from a macro
    By cadamhill in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-05-2012, 04:41 AM
  3. Printing XL File Properties
    By Khaleeque in forum Excel General
    Replies: 0
    Last Post: 04-11-2007, 12:54 AM
  4. Setting printing properties
    By Carl in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-08-2006, 02:10 PM
  5. Sheet tab properties
    By marko in forum Excel General
    Replies: 7
    Last Post: 12-11-2005, 11:25 AM
  6. [SOLVED] Printing Document Properties
    By AnytimeAnywhere in forum Excel General
    Replies: 1
    Last Post: 10-04-2005, 12:05 PM
  7. [SOLVED] Printing/Displaying File Properties
    By Patrick.McNamara in forum Excel General
    Replies: 0
    Last Post: 06-23-2005, 12:05 PM
  8. [SOLVED] Printing the page properties as header
    By r_najafi in forum Excel General
    Replies: 1
    Last Post: 01-06-2005, 11:06 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