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