Hello,
I see these codes in my book:
but I am questioned about two things:Private Sub Workbook_BeforePrint(Cancel As Boolean) 'Hide columns B:D on Sheet1 before printing Worksheets("Sheet1").Range("B:D").EntireColumn.Hidden = True End Sub
It didn't use Cancel at all and Range("B:D") are three columns exactly.
- Why add Cancel As Boolean on the first row?
- Why add EntireColumn before Hidden
Thanks.
Bookmarks