hi.
i have a macro that saves as an excel file with the name composed of some cells from the activesheet.
in fact it works fine.
but i'd like the code check if the file and and then do what it needs to do but i couldnt succeed.
could someone help me to correct what ever wrong in this code ?
altough the file exists the below code do not givee me the message.
Sub pdfolarakkaydet()
fname = ActiveSheet.Range("D11") & ActiveSheet.Range("D15") & ActiveSheet.Range("D10")
If Dir("G:\GOOGLE DRİVE\SPRİNGSOURCİNG\renk çalışmaları foto\TEST SAPORLARI\fname.pdf") <> "" Then
MsgBox "File exists!"
Else
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, filename:= _
"G:\GOOGLE DRİVE\SPRİNGSOURCİNG\renk çalışmaları foto\TEST SAPORLARI\" & fname, _
Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _
:=False, OpenAfterPublish:=False
End If
End Sub
Bookmarks