Try the other syntax of Do until:
Do Until condition
action
Loop
Private Sub CommandButton1_Click()
'
'set starting point under header
row_number = 1
Do Until IsEmpty(Cells(row_number, "A"))
row_number = row_number + 1
Call SendEmail(Sheet1.Range("A" & row_number), Sheet1.Range("B" & row_number), Sheet1.Range("C2"))
Loop
End Sub
This will first check for instances matching the condition and then execute the action. It should prevent the macro from trying to send an e-mail to the blank cell it stops on
Bookmarks