Jimmcintyre
11-20-2022, 04:12 PM
Hello, i am trying to run a macro that PDFs an array of sheets in the description. However i have a macro that hides certain sheets pending other options and when i do the printout option it comes up with an error if one of the sheets has been hidden. The sheets need to remain hidden depending on the options.
The code i currently have is below.
Sub PrintSpecificSheets()
ThisWorkbook.Worksheets(Array("D 30%", "EW 30%", "RW 30%", "S 30%", "W 30%")).PrintOut
End Sub
Is there an option i can include that only PDFs the visible sheets out of whats included in the above array?
It would be perfect if the PDF of the visible sheets is combined of all sheets in the array that are visible and visible only.
The code i currently have is below.
Sub PrintSpecificSheets()
ThisWorkbook.Worksheets(Array("D 30%", "EW 30%", "RW 30%", "S 30%", "W 30%")).PrintOut
End Sub
Is there an option i can include that only PDFs the visible sheets out of whats included in the above array?
It would be perfect if the PDF of the visible sheets is combined of all sheets in the array that are visible and visible only.