Hello everyone
I would like to save a pdf file by taking the information from cell B1 and saving it to its own folder.
This is the macro that I have created to do this.

Sub MakePdf()
'
' MakePdf Macro
'
ChDir "D:\MyDir\Sub_Dir"
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"D:\MyDir\Sub_Dir\File_" & Range("B1").Value & ".pdf", Quality:= _
xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, _
OpenAfterPublish:=True
End Sub

A B
1 Sub_Dir File_Name

What I don’t know is how to check the information from cell A1 and verify if the folder already exists with that name (Info from A1)
If it the folder does exist save the file in it, but if it doesn’t then create a new folder and save the file in there.


Thanks in advance.

Luis