I have a macro which runs through my ranges and checks to see if "some" of them are empty. If they are, it "pauses" (exits, but reenters upon the next range change).
This is what I came up with, but there has to be a better way to do this.
Code:
Private Sub CheckRange()
Dim bTrueFalse As Integer
Dim iContinue As Integer
Dim iNext As Integer
Dim sMsgBox As String
' 1 is TRUE - it is filled out
' 0 is FALSE - it is not filled out
' assume it's filled out
bTrueFalse = 1
For iContinue = 1 To 13
' If Trim(Range("Range" & iContinue).Text) = "" Then
If IsEmpty(Range("Range" & iContinue)) Then
bTrueFalse = 0
Else
bTrueFalse = 1
End If
If bTrueFalse = 0 Then
Select Case iContinue
Case 1
MsgBox ("Please fill in the required field: [SUBJECT]")
Range("Range" & iContinue).Select
Exit Sub
Case 2
MsgBox ("Please fill in the required field: [FACILITATOR]")
Range("Range" & iContinue).Select
Exit Sub
Case 3
MsgBox ("Please fill in the required field: [DATE]")
Range("Range" & iContinue).Select
Exit Sub
Case 4
MsgBox ("Please fill in the required field: [PARTICIPANTS]")
Range("Range" & iContinue).Select
Exit Sub
Case 5
Range("Range" & iContinue).Select
Case 6
MsgBox ("Please fill in the required field: [FUNCTIONAL AREA]")
Range("Range" & iContinue).Select
Exit Sub
Case Else
Range("Range" & iContinue + 1).Select
Exit Sub
End Select
Exit Sub
Else
iNext = iContinue + 1
Range("Range" & iNext).Select
End If
Next iContinue
End Sub