Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem with IF...THEN...ELSEIF + DO ... LOOP + WHILE ... WEND
#3
I'm suprised that you don't get an "expression too complex!" error!

WHY do you need the second DO LOOP? Nothing changes........and what happens if none of the IF and ELSEIF statements are True? You get stuck there until a key is pressed.

I think that you have too many ELSEIF comparisons. Some portions are repeated with additional comparisons.

My suggestion: Start from the left and make that one IF statement. Then use the next comparison if that is true to make further comparisons.

Code:
IF Future.MouseX% > 37 AND Future.MouseX% < 61 THEN

ELSEIF will find the first comparison that is True, no matter how much is added to later comparisons!

Get my QB demonstrator here: http://dl.dropbox.com/u/8440706/Q-Basics.zip
Reply


Messages In This Thread
Re: Problem with IF...THEN...ELSEIF + DO ... LOOP + WHILE ... WEND - by Clippy - 06-16-2009, 04:35 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)