Visual Basic Scripting Edition  

Invalid 'exit' statement

You used an Exit statement inside one of the following program control constructs:

You can legally use an Exit statement to leave these structures only:

To correct this error

See Also

Exit Statement | Do...Loop Statement | For Each...Next Statement | For...Next Statement | Function Statement | Sub Statement