• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

VBA Macro for emailing files with attachments

Loz Jordan

New Member
Hello

I am using the below macro to send emails to multiple users with multiple attachments but it is falling down here and I can't work out why.
1719917872703.png
The columns on my Controls worksheet are as foillows
1719917934807.png
I have double checked that the file paths entered into column I are working and direct me to valid files etc.

I would be really grateful for your help.

Best wishes
Lauren
 
Loz, you say that statement is "falling down", but how is it falling down? Does the program disappear from your workbook, or does it display an error message, or does it fail to add an attachment, or what? The error message is the obvious suspicion, but if so what (exactly) does it say?
 
Thank you for your reply. Apologies, I should have made this clear.
The debug tells me that the yellow highlighted code is the issue (I’m not very experienced with macros though so I am not totally sure). It sends the first row in the list correctly with the attached file from col I but then stops and doesn’t send anymore.

Lauren
 
Nope, that's not what I need to know. Don't paraphrase the error message—quote it. For example, I'm sure it doesn't say "The yellow highlighted code is the issue", but it might say "Sub or function not defined", or "Object doesn't support this property or method", or "Subscript out of range", like that.

(These error messages are important; you gotta actually read them. It may be that once you actually look at the error message you're getting here, you won't need our help after all, because the message will tell you what you need to know. Not necessarily, because some messages haven't an obvious meaning until you know more. But you have to start there, anyway.)
 
Doh! - thank you for the pointer to actually read the error messages. This was a case of 'user malfunction' - it couldn't fine the attachments because I hadn't added xlsx onto the end of the filepath!!!! - thank you very much for your help.
 
LOL. I had a user, some year ago, tell me that something "didn't work". "What did it do?", I asked. "Nothing." Of course that wasn't true, so I suggested that it displayed a message; what did it say? "Oh, it said some damn thing", he responded, but he was laughing at himself when he said it because this was a conversation he and I had had before.
 
Back
Top