I have tried finding code for hiding rows from range with value criteria, with applying it to multiple protected sheets. Could someone help build the right code.Original code as following (i'll explain what i would need after the code):
Sub CreatePDF_ERIKHONOKRISSEPETE()
sheetname = ActiveSheet.Namework
bookname = ActiveWorkbook.Name
Dim shtAry()
ReDim shtAry(3) ' this is an array of length X ?
For I = 1 To 4
shtAry(I - 1) = Sheets(I).Name
Debug.Print Sheets(I).Name
Next I
ThisWorkbook.Sheets(shtAry).Select
Debug.Print ThisWorkbook.Path & "\"ActiveSheet.ExportAsFixedFormat xlTypePDF, ThisWorkbook.Path & "\" & Range("TARKISTUSSIVU!$U$1").Value & ".pdf", _ Quality:=xlQualityStandard, _ IncludeDocProperties:=True, _ IgnorePrintAreas:=False, _ OpenAfterPublish:=True
ThisWorkbook.Sheets(sheetname).Select
End Sub
So this function creates one pdf file from protected sheets 1 to 4. I would wan't that this function would hide all rows that have value "0" in range F10:F39, in all previously selected protected sheets. So the pdf would not have those wanted hidden rows present neither of pdf pages (protected sheets). After pdf creation, the hidden lines would be unhidden again.
I would be thankful from help.
Sub CreatePDF_ERIKHONOKRISSEPETE()
sheetname = ActiveSheet.Namework
bookname = ActiveWorkbook.Name
Dim shtAry()
ReDim shtAry(3) ' this is an array of length X ?
For I = 1 To 4
shtAry(I - 1) = Sheets(I).Name
Debug.Print Sheets(I).Name
Next I
ThisWorkbook.Sheets(shtAry).Select
Debug.Print ThisWorkbook.Path & "\"ActiveSheet.ExportAsFixedFormat xlTypePDF, ThisWorkbook.Path & "\" & Range("TARKISTUSSIVU!$U$1").Value & ".pdf", _ Quality:=xlQualityStandard, _ IncludeDocProperties:=True, _ IgnorePrintAreas:=False, _ OpenAfterPublish:=True
ThisWorkbook.Sheets(sheetname).Select
End Sub
So this function creates one pdf file from protected sheets 1 to 4. I would wan't that this function would hide all rows that have value "0" in range F10:F39, in all previously selected protected sheets. So the pdf would not have those wanted hidden rows present neither of pdf pages (protected sheets). After pdf creation, the hidden lines would be unhidden again.
I would be thankful from help.