Hi All,
The code below creates a PDF file for each worksheet in the workbook. I have a VBA code that works on a new workbook, but once the file is closed and opened again, when running the code again, the code seems to run, but does not produce any files. Any help is appreciated:
Code
Option Explicit
Sub createPDFfiles()
Dim ws As Worksheet
Dim Fname As String
For Each ws In ActiveWorkbook.Worksheets
On Error Resume Next
Fname = "2016 Increase Letter-" & ws.Name
ws.ExportAsFixedFormat _
Type:=xlTypePDF, _
Filename:=Fname, _
Quality:=xlQualityStandard, _
IncludeDocProperties:=True, _
IgnorePrintAreas:=False
Next ws
End Sub
Display More