I need some basic help that I can't get right in my code.
Saving as both an .xlsx and PDF file, in the same location, just can't get it to prompt if filename already exists
Sub SaveAs()
Dim Path As String
Dim filename As String
Path = "C:\Users\yard\Dropbox\Modus\Purchase Orders\"
filename = Range("E4")
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs filename:=Path & filename & ".xls", FileFormat:=xlOpenXMLWorkbook
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, filename:=Path & filename & ".pdf", Quality:= _
xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, _
OpenAfterPublish:=True
End Sub
Or have I cancelled that out by using Application.DisplayAlerts = False?
I don't want to be prompted regarding a macro enabled workbook when saving the excel file, however I would like it to prompt if the filename already exists.