By: Md. Abu Sina Ibne Albaruni

In reply to kazem.

Dear KAZEM

Thank you for taking the time to read this article. I see that you are facing a problem while executing the code. It is the Run-time error ‘1004’. There are several possible reasons for this error. In your case, I believe you are having this issue because the file path you specified is incorrect or unavailable. Please note that you need to modify the file path according to the destination where you want to save the PDF file. You have to change the file path portion in the Filename variable.

For your convenience, I am attaching a photo indicating the exact portion of the code that you need to re-write.

If you have any more questions, please let us know in the comments.

Regards
Md. Abu Sina Ibne Albaruni
Team ExcelDemy