Forum Discussion
Edg38426
Feb 08, 2023Brass Contributor
VBA Code for sending email not working
I am using the following code in a workbook. The idea is that if a date is added in Column T, an email will generate that pulls other data into the body of the email and displays it before sending. I...
- Feb 08, 2023
Click in the first line
Private Sub Worksheet_Change(ByVal Target As Range)and press F9 to set a breakpoint.
Enter or edit a date in a cell in column T.
The code will pause at the breakpoint.
Press F8 repeatedly to execute the code line by line, and observe carefully at which point it suddenly stops.
HansVogelaar
Feb 08, 2023MVP
Click in the first line
Private Sub Worksheet_Change(ByVal Target As Range)
and press F9 to set a breakpoint.
Enter or edit a date in a cell in column T.
The code will pause at the breakpoint.
Press F8 repeatedly to execute the code line by line, and observe carefully at which point it suddenly stops.
- Edg38426Feb 08, 2023Brass ContributorI figured it out. I wasn't paying attention and had inserted the code into a module instead of where it needed to be. Sorry to waste your time!
- HansVogelaarFeb 08, 2023MVP
Glad you found it!
- Edg38426Feb 08, 2023Brass ContributorI'm not seeing it do ANYTHING in the VBA editor.