Hi all,
I have the following code that I would like to adapt to change from saving one worksheet to saving two as a pdf.
The worksheet names are "NCR" and "RCA" and the code is as follows:
Any help will be greatly appreciated.
Many thanks,
I have the following code that I would like to adapt to change from saving one worksheet to saving two as a pdf.
The worksheet names are "NCR" and "RCA" and the code is as follows:
Code:
Sub SaveAsPDFExcel()
Dim fName As String
Dim sLoc As String 'location
sLoc = "I:\FST\Quality\Non-Conformance\Non-Conformance Reports\Open\"
With ActiveSheet
fName = .Range("L4").Value & "-" & .Range("E6").Value
'Save as xlsx
ActiveWorkbook.SaveAs Filename:=sLoc & fName, FileFormat:=xlOpenXMLWorkbookMacroEnabled
.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
sLoc & fName, Quality:=xlQualityStandard, _
IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=True
End With
End Sub
Any help will be greatly appreciated.
Many thanks,