Dim d, sa As Int
Do Until (sa-520)<0
d=d+1
sa=1400-(d*520)
Loop
Log(d)
Log(sa)
Ups, you're right, sorry, editas you indicated it is DoEvents that was deprecated not Do Until loops. Too fast reading?
dim
Thankyou for you answer really help me for this situation.When you define your int's they default to 0 so you're straight away saying
Do until -520 < 0 which of course it is and the loop exits immediately.
[you should use the code option to display code by the way like this...]
Loop problem:Dim d, sa As Int Do Until (sa-520)<0 d=d+1 sa=1400-(d*520) Loop Log(d) Log(sa)
So, i must define value of sa after define the int of sa.
dim sa as int = 999 'or whatever value'