I have the following code in the middle of a routine. What I want is for it to check each cell in a range and if there is an empty one, bring up the message box and then stop executing code. It seems to bypass this whole bit entirely.
The check can't be done any earlier than this because before this is where I figure out the range that I need to check for empty cells. Zero value is OK, I just need to make sure that there is something in every cell in the range.
EmptyPaid = 0 For i = 1 To EndSumR - BeginSumR If ActiveCell.Value = "" Then EmptyPaid = EmptyPaid + 1 End If ActiveCell.Offset(1, 0).Select Exit For Next i If EmptyPaid > 0 Then MsgBox ("There is an empty cell in the Paid column for this deposit." & Chr(13) & "Please correct and try again.") Exit Sub Else [continue with the rest of the routine]