![]() If ThisWorkbook.Sheets(cell.Value2).Visible xlSheetVisible Then 'Check if workbook is protectedīlnWbProtection = ThisWorkbook.ProtectWindows Or ThisWorkbook.ProtectStructure 'originally hidden sheets will not be hidden again at the end MsgBox errorMsg, vbCritical, "The following sheet(s) is/are not in Thisworkbook: " Exit Sub End If 'Check if any of the sheets is hidden in the source sheets, if yes unhide loop through all the sheets and check visibility 'Exit if any of the sheets is not existing If isSheetExistsThisworkbook(cell.Value2) = False Then Set sourceRng = sh_main.Range( "tbl_sheetList") 'Source of the sheets is a table on Main page, easy to maintain, expand or narrow down ' Purpose: Create pdf with SaveAs with several built in checksĭim pdfPath As String, pdfName As String Dim shArray() As Variant Dim sh_main As Worksheetĭim sourceRng As Range, cell As Range, cell1 As Rangeĭim blnWbProtection As Boolean Dim errorMsg As String Set sh_main = ThisWorkbook.Sheets( "Main") IgnorePrintAreas:= False, OpenAfterPublish:= True End Sub saveAsWithChecksPDFCreation '. PdfPath = pdfPath
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |