paulcherianc
Member
Dear Experts!
Can you please let me know where am I wrong with my coding? I am not able to run this macro. I think it happened when I inserted InvNo in between the codes.
Can you please let me know where am I wrong with my coding? I am not able to run this macro. I think it happened when I inserted InvNo in between the codes.
Code:
Option Explicit
Public Sub PDFexport1()
Dim PdfPath As String
Dim InvNo As String
InvNo = Worksheets("01Q").Range("E17").Value
ThisWorkbook.Sheets(Array("01Q", "Alstom IT Clinic QAR", "IT")).Select
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
Worksheets("Macro").Range("L13") & "\" & "Alstom Invoices" & InvNo & ".pdf", Quality:=xlQualityStandard, IncludeDocProperties:=True, _
IgnorePrintAreas:=False, OpenAfterPublish:=False
PdfPath = Worksheets("Macro").Range("L13") & "\" & "Alstom Invoices" & InvNo & ".pdf"
Worksheets("SummaryTemp").Range("A1").Value = PdfPath
End Sub
Last edited: