I am trying to generate reports and save the files in a folder, but I want to create the folder if it does not already exist. If it does exist, I want it to just save the file there. Right now I am just setting it to make a directory, which was fine, but if I have other reports going to that same folder and the folder already exists, I get a "Path/File Access error" Is there a little line of code I can put in that first checks to see if the folder exists?
In the end I want to check the folder to see if it exists and save there but ask if I want to overwrite the file if a file by the same name already exists. The overwrite the file part I was helped with on this forum already just trying to put it into action to go with everything.
Thanks,
~J
MyDate = Trim(VBA.Format(Now(), "MM-DD-YY"))
Application.DisplayAlerts = False
MkDir "G:\Reports\Friday Reports\" & MyDate
ActiveWorkbook.SaveAs filename:="G:\Reports\Friday Reports\" & _
MyDate & "\" & filename
Bookmarks