Forum Discussion
Need Help with Excel Macro
- Sep 12, 2022
See the attached version. The code is in Module1.
The code doesn't create any email messages since none of the rows satisfy the conditions in
If rngCell.Offset(0, 6) > 0 Then
ElseIf rngCell.Offset(0, 5) > Evaluate("Today() +7") And _
rngCell.Offset(0, 5).Value <= Evaluate("Today() +120") Then
- HansVogelaarSep 07, 2022MVP
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.
- Diana703Sep 07, 2022Copper ContributorThank 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 12, 2022Copper ContributorCan you send me the code you used to get the above? I tried editing mine and it didn't work. Thank you.
- HansVogelaarSep 12, 2022MVP
See the attached version. The code is in Module1.