efire_
New Member
- Joined
- Aug 8, 2014
- Messages
- 7
- Office Version
- 365
- Platform
- Windows
Hello! On the very last stages of finalizing an xls, and just can't figure out this last error. The gist of it: on a "Master" sheet, I can select via checkbox which sheets I'd like to be in a PDF. At the bottom there's a "Print" button. When clicked, a macro runs that hides all sheets with unchecked boxes, generates a PDF with all the remaining sheets, then unhides everything and opens the PDF.
That all was working great - then I did some row changing / small formatting, and this error message pops up when the Print button is clicked: "Error 1004 - Unable to set the visible property of the worksheet class". I hit Debug and it takes me to this line of code:
Sheets("Master").Visible = xlSheetHidden
And no, nothing in the workbook is protected (saw that fix on Google). And I get that excel has to leave one sheet visible at all times (it hides the Master sheet when the Print button is selected), but then why would that error appear when I have clearly checked the boxes to leave other sheets visible?
Any help would be hugely appreciated. Thanks a ton in advance!
That all was working great - then I did some row changing / small formatting, and this error message pops up when the Print button is clicked: "Error 1004 - Unable to set the visible property of the worksheet class". I hit Debug and it takes me to this line of code:
Sheets("Master").Visible = xlSheetHidden
And no, nothing in the workbook is protected (saw that fix on Google). And I get that excel has to leave one sheet visible at all times (it hides the Master sheet when the Print button is selected), but then why would that error appear when I have clearly checked the boxes to leave other sheets visible?
Any help would be hugely appreciated. Thanks a ton in advance!