i have this section of code:
Do While f < p
If c > b Then
f = f + 1
Form1.txtTime.Text = f
k = d * a
m = Math.Floor(c / b)
e2 = m + a
Form1.txtShares.Text = e2
g = (c - (b * m)) + k
Form1.txtMoney.Text = g
Else
f = f + 1
Form1.txtTime.Text = f
k = d * a
j = c + k
Form1.txtMoney.Text = j
End If
Loop
and it won't loop properly. the first condition in the if then else statement is usually false so it goes on to the else part, but when the loop is concerned it stays in the else part of the code, i need a way to make the loop statement go over the entire if then statement for the duration of the loop rather than just looping through the else statement
2007-06-26
19:01:41
·
4 answers
·
asked by
Anonymous
in
Computers & Internet
➔ Programming & Design
also for...next doesn't work and do...loop while doesn't help either
2007-06-26
19:02:18 ·
update #1
i can get this section of code to work beautifully without the loop in there, so i know the if...then statement is fully functional. What happens is when it starts the loop sequence it notices that c
2007-06-27
04:34:42 ·
update #2
actually c and b do have values as well as p its just not in this section of code
2007-06-27
04:37:18 ·
update #3