Making an Excel tab not print?

后端 未结 7 578
野性不改
野性不改 2020-12-19 16:35

Is there any way in Excel to make it so that a particular tab isn\'t included when you print the entire workbook? As in, Sheet1, Sheet2, and Sheet3 print, but not Sheet4.

7条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-19 17:00

    These answers will require the use of macros.
    Hide the sheet before printing.

     sheets("WorksheetToNotPrint").visible = xlSheetHidden 'or 0
    

    or

     sheets("WorksheetToNotPrint").visible = xlSheetVeryHidden 'or 2
     'used if you don't want people to unhide the worksheet without knowing code
    

    and

     sheets("WorksheetToNotPrint").visible = xlSheetVisible 'or -1
    

    when done

    another option is to print the sheets you want printed (may be useful if you only want a few sheets printed:

    Sub Print_Specific_Sheets()
    Sheets(Array("Sheet1", "Sheet2", "Sheet4")).Select
    ActiveWindow.SelectedSheets.PrintOut
    Sheets("Sheet1").Select
    End Sub
    

提交回复
热议问题