Forhindring af udskrivning / Avoid print

Disse to VBA subs forhindrer, at det definerede ark bliver printet.

‘Hide the sheet “SheetName” to prevent it from being printed.
Private Sub Workbook_BeforePrint(Cancel As Boolean)

ActiveWorkbook.Worksheets(“SheetName”).Visible = xlSheetVeryHidden

End Sub

‘Unhide the sheet “SheetName” to make it visible and useable.
Private Sub Workbook_SheetActivate(ByVal Sh As Object)

ActiveWorkbook.Worksheets(“SheetName”).Visible = True

End Sub