Hello.I have a workbook containing 200 Excel sheets, I want to save the papers starting from sheet 50 to the last sheet in the workbook in pdf format
So that they are displayed one sorry the other.
So that they are displayed one sorry the other.
VBA Code:
Sub PrintSpecificSheetsToPdfWithLoop()
Dim iSheets() As String
Dim iCount As Long
iFolder = ThisWorkbook.Path & "\"
iFile = "test"
ReDim iSheets(50To ThisWorkbook.Sheets.Count)
For iCount = LBound(iSheets) To UBound(iSheets)
iSheets(iCount) = ThisWorkbook.Sheets(iCount).Name
Next iCount
ThisWorkbook.Sheets(iCount).ExportAsFixedFormat Type:=xlTypePDF, Filename:=iFolder, Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=True
End Sub