Hi I want to send email mail to the address which is checked I have:
- Check box
- Column Name
Column Email
Sub reminder1() Dim lRow As Integer Dim i As Integer Dim toList As String Dim eSubject As String Dim eBody As String With Application .ScreenUpdating = False .EnableEvents = False .DisplayAlerts = False End With Sheets(1).Select lRow = Cells(Rows.Count, 4).End(xlUp).Row For i = 2 To lRow If Sheets("Sheet1").CheckBox1.Value = True Then Set OutApp = CreateObject("Outlook.Application") Set OutMail = OutApp.CreateItem(0) Cells(i, 5) = "Mail Sent " & Date + Time Cells(i, 5).Font.Bold = True toList = Cells(i, 3) eSubject = "Your " eBody = "Good Day" On Error Resume Next With OutMail .To = toList .CC = "" .BCC = "" .Subject = eSubject .BodyFormat = olFormatHTML .Display .HTMLBody = eBody & vbCrLf & .HTMLBody '.Send End With On Error GoTo 0 Set OutMail = Nothing Set OutApp = Nothing End If Next i ActiveWorkbook.Save With Application .ScreenUpdating = True .EnableEvents = True .DisplayAlerts = True End With End Sub
Problem is that if i check first one it send email to all if not checked it is not sending email even other check boxes are checked