Any help appreciated!
When saving .xlsx files with the command ActiveWorkbook.SaveAs I get waning that says the file already exist.
But the codes below which prints the pdf file to specified folder, it overwrites every time.
How can I get notified that there is already existing file?
Dim PdfFileName As String
Dim Wsheet As String
PdfFileName = Range("P1").Value & " " & Range("H11").Text & " " & Range("H12").Text & " " & Range("C12").Value
Wsheet = ActiveSheet.Name
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"C:\Users\cangokturk\Desktop\Invoices\" & PdfFileName & ".pdf", _
Quality:=xlQualityStandard, _
IncludeDocProperties:=True, _
IgnorePrintAreas:=False, OpenAfterPublish:=True
Cheers!
Bookmarks