You don't show the code for setting the path - make sure that it includes a terminal "" like one of these:
path = ThisWorkbook.Path & ""
path = "C:\Folder with files"
You can also troubleshoot by adding this line just before:
Msgbox attachment
And you may need to lose the ()s around attachment