Forum Discussion
Diana703
Sep 07, 2022Copper Contributor
Need Help with Excel Macro
I have a large excel sheet (macro enabled) that I want to send email from with specific data in each email. I have all working right but I can't get it to create an email to send to each email addre...
- Sep 12, 2022
See the attached version. The code is in Module1.
HansVogelaar
MVP
I temporarily commented out the criteria, since they don't work, and don't make any sense to me. I got these three messages. Three different recipients, three different subjects, and (not shown) three different message texts. So the problem must lie elsewhere.
Diana703
Sep 07, 2022Copper Contributor
Thank you so much for continuing to help me. I'm not sure what you mean by " commented out the criteria"...what is the criteria? I'll take it out on my end if you tell me what it is and see if I get the same thing.
- HansVogelaarSep 07, 2022MVP
I meant the lines
If rngCell.Offset(0, 6) > 0 Then
ElseIf rngCell.Offset(0, 5) > Evaluate("Today() +7") And _
rngCell.Offset(0, 5).Value <= Evaluate("Today() +120") Thenand the corresponding End If.
- Diana703Sep 07, 2022Copper ContributorThose particular lines of code put in my email date that the emails are sent. I took them out and my spreadsheet went wild. Kept on producing emails. I still have to delete them but I'm guessing it produced about 100 emails, all to the same recipient and it filled in all the black cells in the first three lines of my spreadsheet data with todays date.
- HansVogelaarSep 07, 2022MVP
I'm afraid I can't explain that.