I'm trying to get visible tabs to save to 1 PDF, but there are a few tabs I want to exclude from the print.
I have got some code so far but it has a few problems:
Problems:
Any advice??
I have got some code so far but it has a few problems:
VBA Code:
Dim sht As Worksheet
For Each sht In ActiveWorkbook.Worksheets
If sht.Visible = True Then sht.ExportAsFixedFormat Type:=xlTypePDF,
Problems:
- It saves each sheet as a separate PDF, rather than as a combined PDF
- It saves all visible sheets - there are some sheets I don't want to include.
- i.e. I always want to exclude Sheet2 and Sheet3 from the print, even though they are visible in the workbook. The rest should be included if visible (approx 100 tabs so not practical to list them all out)
Any advice??