'Exit For' can only appear inside a 'For' statement
An Exit For statement occurs outside a For loop. Exit For is valid only between a For or For Each statement and a corresponding Next statement.
Error ID: BC30096
To correct this error
Make sure a valid For or For Each statement precedes the Exit For, and a valid Next statement appears after it.
Verify that other control structures within the For loop are correctly terminated.