Greetings,
I need some assistance with sheet collections.
I have a large spreadsheet that our designers copy onto each job file and use.
The first 103 sheets do not get printed or exported to pdf. We only send out the new generated pages.
I have written code to select all sheets from sheet #104 to the end and added them to a collection.
My problem is exporting to a pdf.
Here is the code I have to collect the sheets.
Any ideas or help on this topic would be greatly appreciated.
If there is a better way to accomplish this task, I'm all ears.
Thanks,
I need some assistance with sheet collections.
I have a large spreadsheet that our designers copy onto each job file and use.
The first 103 sheets do not get printed or exported to pdf. We only send out the new generated pages.
I have written code to select all sheets from sheet #104 to the end and added them to a collection.
My problem is exporting to a pdf.
Here is the code I have to collect the sheets.
Any ideas or help on this topic would be greatly appreciated.
If there is a better way to accomplish this task, I'm all ears.
Thanks,
Code:
Sub Print_Sheets()
Dim col As Collection
Set col = New Collection
For Each wssheet In Worksheets
i = i + 1
If i > 104 Then
col.Add wssheet
End If
Next
'Debug section
Debug.Print ThisWorkbook.Path & "\"
For Each ele In col
Debug.Print "ele in col: " & ele.Name
Next ele
For Each ele In Sheets
Debug.Print "ele in Sheets: " & ele.Name
Next ele
End Sub