Hello,
I have 3 sub statements here.
1.Sub Publish_PDF ()
2.Sub Create_Report_Email()
3.Sub Mail_Report()
The first one (1) calls for the defined range to be published as a PDF. The second (2) calls for the first (1) to be attached to an outlook email with all fields populated after the first Sub is executed. And the third (3) is just a combination of both the first (1) and the second (2)ones with no additional details in the code, although it is really another version of the second one, because the second one does also create the PDF file.
Upon execution, the first and the third ones are working properly. Not as used together but if I execute them individually. They will do as coded. However, when I execute the second one, which is ultimately the same as the third one but instead of writing the whole first (1) Sub, I just called it as in
before adding the last part of code with the outlook to complete the code, I get an error on as highlighted below.
Call PDF.PNG
My guess is that Calling the Sub doesn't necessarily link it to the remaining of the code, hence it does not execute properly.
Do I need to add more things in the code for the whole code to sync or it has to be written as in the third sub statement?
Thank you.
1.Publish_PDF ()
2.Create_Report_Email()
3.Mail_Report()
Bookmarks