This worked for me until I tried to add a second region. It seems to just ignore the second check. What's not right here?
----
Dim intResp As Integer
'East Region check
Select Case UCase(Range("$D$9"))
Case "East"
Select Case UCase(Range("$D$46"))
Case Is = "AL", "FL", "GA", "MS", "NC"
Case Else
intResp = MsgBox("There's a mismatch. Click Cancel to correct or OR to continue.", vbOKCancel, "State / Region Mismatch")
Select Case intResp
Case Is = vbCancel 'or 2
Exit Sub
Case Else 'or = vbOK or 1
End Select
End Select
'West Region check
Select Case UCase(Range("$D$9"))
Case "West"
Select Case UCase(Range("$D$46"))
Case Is = "CA", "OR"
Case Else
intResp = MsgBox("There's a mismatch. Click Cancel to correct or OR to continue.", vbOKCancel, "State / Region Mismatch")
Select Case intResp
Case Is = vbCancel 'or 2
Exit Sub
Case Else 'or = vbOK or 1
End Select
End Select
End Select
----
Dim intResp As Integer
'East Region check
Select Case UCase(Range("$D$9"))
Case "East"
Select Case UCase(Range("$D$46"))
Case Is = "AL", "FL", "GA", "MS", "NC"
Case Else
intResp = MsgBox("There's a mismatch. Click Cancel to correct or OR to continue.", vbOKCancel, "State / Region Mismatch")
Select Case intResp
Case Is = vbCancel 'or 2
Exit Sub
Case Else 'or = vbOK or 1
End Select
End Select
'West Region check
Select Case UCase(Range("$D$9"))
Case "West"
Select Case UCase(Range("$D$46"))
Case Is = "CA", "OR"
Case Else
intResp = MsgBox("There's a mismatch. Click Cancel to correct or OR to continue.", vbOKCancel, "State / Region Mismatch")
Select Case intResp
Case Is = vbCancel 'or 2
Exit Sub
Case Else 'or = vbOK or 1
End Select
End Select
End Select