> Dim llStop As Boolean = False > > ' For each LXSelection for a disabled > For Each loObject In oSelectionDisabled > > ' Reset the value > llStop = False > > ' Initialization > lcField = loObject(1) > lnValue = loObject(2) > > ' For each LXSelection which needs to be replaced with a warning > For Each loObject2 In oSelectionWarning > > ' Initialization > lcField2 = loObject(1) > > ' If this field is a request for a disable and a warning > If lcField = lcField2 Then > > ' We cancel as the warning has priority > llStop = True > Exit For > > End If > > Next > > ' If we stop > If llStop Then > Continue For > End If > > ' Additional code here > ... > > Next >But declared in the outer scope not the inner