i want to making diffrent number invoice in my PC also want save pdf in my target folder
i was trying to by your coding but it change mumber but not save pdf in target folder
here that coading
Sub NextInvoice()
Range("B2").Value = Range("B2").Value + 1
Range("B9:B18").ClearContents
End Sub
Sub SaveInvoiceAsPDFAndClear()
Dim NewFN As Variant
NewFN = "C:\Users\admin\Documents\invoice copy" & Range("B2").Value & ".pdf"
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=NewFN, _
Quality:=xlQualityStandard, IncludeDocProperties:=True, _
IgnorePrintAreas:=False, OpenAfterPublish:=False
Range("B2").Value = Range("B2").Value + 1
Range("B9:B18").ClearContents
End Sub
i was trying to by your coding but it change mumber but not save pdf in target folder
here that coading
Sub NextInvoice()
Range("B2").Value = Range("B2").Value + 1
Range("B9:B18").ClearContents
End Sub
Sub SaveInvoiceAsPDFAndClear()
Dim NewFN As Variant
NewFN = "C:\Users\admin\Documents\invoice copy" & Range("B2").Value & ".pdf"
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=NewFN, _
Quality:=xlQualityStandard, IncludeDocProperties:=True, _
IgnorePrintAreas:=False, OpenAfterPublish:=False
Range("B2").Value = Range("B2").Value + 1
Range("B9:B18").ClearContents
End Sub