Hey all,
I currently have a macro that will go through all the tabs in my worksheet, export them to pdfs, rename, and save them to a certain location.
However, I was wondering if it would be possible to only target pdf tabs that are a certain color.
IE - PDF all tabs that are green and ignore all other tabs. Here is the code that I have so far:
Sub ExportToPDFs()
' PDF Export Macro
' Change C:\Exports\ to your folder path where you need the files are saved
' Save Each Worksheet to a separate PDF file.
Dim ws As Worksheet
For Each ws In Worksheets
ws.Select
nm = ws.Name
mn = "_01.31.18"
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, _
Filename:="File location" & nm & mn & ".pdf", _
Quality:=xlQualityStandard, IncludeDocProperties:=True, _
IgnorePrintAreas:=False, OpenAfterPublish:=False
Next ws
End Sub
Any suggestions?
Thanks in advance!
I currently have a macro that will go through all the tabs in my worksheet, export them to pdfs, rename, and save them to a certain location.
However, I was wondering if it would be possible to only target pdf tabs that are a certain color.
IE - PDF all tabs that are green and ignore all other tabs. Here is the code that I have so far:
Sub ExportToPDFs()
' PDF Export Macro
' Change C:\Exports\ to your folder path where you need the files are saved
' Save Each Worksheet to a separate PDF file.
Dim ws As Worksheet
For Each ws In Worksheets
ws.Select
nm = ws.Name
mn = "_01.31.18"
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, _
Filename:="File location" & nm & mn & ".pdf", _
Quality:=xlQualityStandard, IncludeDocProperties:=True, _
IgnorePrintAreas:=False, OpenAfterPublish:=False
Next ws
End Sub
Any suggestions?
Thanks in advance!