Mr Integrity
New Member
- Joined
- Apr 19, 2018
- Messages
- 4
Hello all
I have a file with about 100 different sheets. I need to be able to print individual pdf's of each sheet automatically. I currently use the following
Dim ws As Worksheet
For Each ws In Worksheets
ws.Select
nm = ws.Name
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, _
Filename:="C:\\Users\Daniel Bean\Desktop\CFO" & nm & ".pdf", _
Quality:=xlQualityStandard, IncludeDocProperties:=True, _
IgnorePrintAreas:=False, OpenAfterPublish:=False
Next ws
End Sub
This works fine but the problem is that I do not want all sheets printed nor the same ones each time. How can I make a list to tell it which ones I want to print or even better how can I program it to print only sheets that a certain cell is > 0? Any help would be greatly appreciated.
I have a file with about 100 different sheets. I need to be able to print individual pdf's of each sheet automatically. I currently use the following
Dim ws As Worksheet
For Each ws In Worksheets
ws.Select
nm = ws.Name
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, _
Filename:="C:\\Users\Daniel Bean\Desktop\CFO" & nm & ".pdf", _
Quality:=xlQualityStandard, IncludeDocProperties:=True, _
IgnorePrintAreas:=False, OpenAfterPublish:=False
Next ws
End Sub
This works fine but the problem is that I do not want all sheets printed nor the same ones each time. How can I make a list to tell it which ones I want to print or even better how can I program it to print only sheets that a certain cell is > 0? Any help would be greatly appreciated.