joncom 0 Posted April 25, 2005 Could someone please explain to me what the different is? They are both loops that run until the condition is met.... how do they differ? Share this post Link to post Share on other sites
SlimShady 1 Posted April 25, 2005 Could someone please explain to me what the different is? They are both loops that run until the condition is met.... how do they differ?<{POST_SNAPBACK}>They don't differ. Are you satisfied? Share this post Link to post Share on other sites
Valik 479 Posted April 25, 2005 Do...Until always runs the code at least once. It checks the condition after each run through the body of the loop. While...WEnd checks the condition before running the code, so its possible that the code may not execute if the condition isn't true at the start of the loop. Also, the While loop runs while a condition is true and stops when it is false. The Do loop runs while a condition is false and stops when the condition is true. For example: While 1 = 2 MsgBox(4096, "", "This will never print") WEnd Do MsgBox(4096, "", "This prints") Until 1 <> 2 And Slim, they are totally different. They must be thought of in different ways and are used in different ways, therefore, they are different. If they weren't different, they both wouldn't be present. Share this post Link to post Share on other sites
joncom 0 Posted April 25, 2005 Good answer, Valik! Crystal clear now, thanks! Share this post Link to post Share on other sites