WHILE (statement) (commands) WEND If the statement is true, the program will do everything between WHILE and WEND and come back to WHILE. If the statement is false, the program skips everything between WHILE and WEND. There's also this. REPEAT (commands) UNTIL (statement) This does the same thing, except it will always run the commands at least once.