Exits a Do...Loop, For...Next, a function, a property, or a subroutine.Exit Do, Exit For, Exit Function, Exit Property, Exit SubExit DoOnly valid within a Do...Loop statement to exit the loop. Program execution continues with the statement that follows the Loop statement. If Do...Loop statements are nested, the control is transferred to the loop in the next higher level.Exit ForOnly valid within a For...Next loop to exit the loop. Program execution continues with the first statement that follows the Next statement. In nested statements, the control is transferred to the loop in the next higher level.Exit FunctionExits the Function procedure immediately. Program execution continues with the statement that follows the Function call.Exit PropertyExits the Property procedure immediately. Program execution continues with the statement that follows the Property call.Exit SubExits the subroutine immediately. Program execution continues with the statement that follows the Sub call.The Exit statement does not define the end of a structure, and must not be confused with the End statement.Sub ExampleExitDim sReturn As StringDim sListArray(10) As StringDim siStep As Single For siStep = 0 To 10 ' Fill array with test data sListArray(siStep) = chr(siStep + 65) MsgBox sListArray(siStep) Next siStep sReturn = LinSearch(sListArray(), "B") Print sReturnEnd SubFunction LinSearch( sList(), sItem As String ) As IntegerDim iCount As Integer' LinSearch searches a TextArray:sList() for a TextEntry:' Returns the index of the entry or 0 (Null) For iCount=1 To Ubound( sList() ) If sList( iCount ) = sItem Then Exit For ' sItem found End If Next iCount If iCount = Ubound( sList() ) Then iCount = 0 LinSearch = iCountEnd Function