Excel VBA - leia o valor da célula a partir do código
tarefa para enviar e-mail do excel. Abaixo está a coluna de exemplo. Como posso obter o valor do email do loop? obrigado
Aqui está o meu código:
Dim rng As Range Dim row As Range Dim cell As Range Dim mydate As Date Dim myDiff As LongSet rng = Range("E5:E17") Set rng2 = Range("F5:F17") Dim cell2 As Range
Dim i As Integer i = 5
For Each row In rng.Rows For Each cell In row.Cells
MsgBox cell.Value mydate = cell.Value myDiff = DateDiff("d", Date, mydate) Set rng2 = Range("F" & i) For Each cell2 In rng2 MsgBox cell2.Value Next cell2
If myDiff > -8 And myDiff < 8 Then aEmail.Send End If
i = i + 1 Next cell Next row