How could I make the below VBA loop until a blank cell?
Dim rCell As Range
Set rCell = Range("B7")
Dim sDesc As Range
Set sDesc = Range("C7:O7")
Dim sDiv As Range
Set sDiv = Range("P7:X7")
Dim dEnd As Range
Set dEnd = Range("Y7:AA7")
If Not IsEmpty(rCell) Then
For Each rCell In sDesc
If IsEmpty(rCell) Then
Msg = MsgBox("Please Fill In Blank Cell " & rCell.Address & " Before Saving")
Cancel = True
End If
Next
If WorksheetFunction.CountA(sDiv) = 0 Then
Msg = MsgBox("Please Fill In a Division For Cells Between sDiv")
Cancel = True
End If
For Each rCell In dEnd
If IsEmpty(rCell) Then
Msg = MsgBox("Please Fill In Blank Cell " & rCell.Address & " Before Saving")
Cancel = True
End If
Next
End If
Moderator's note: Please take the time to review our rules. There aren't many, and they are all important. Rule #3 requires code tags. I have added them for you this time because you are a new member. --6StringJazzer
Bookmarks