|
-
Sep 20th, 2010, 09:05 PM
#2
Re: Problem with Do Loop
As far as displaying the results, you're setting the Text of the TextBox each time so you're going to overwrite the previous data each time. If you want to show every month then you need to append the data, not replace.
As for the infinite loop, your exit condition is (balance = 0), so obviously that is not being met. Maybe you are overshooting by a tiny amount. To find out, you need to debug your code. Place a breakpoint at the start of the loop with the F9 key. When execution breaks at that line, you can step line by line using the F10 key. At each step you can use the Autos, Locals, Watch and Immediate windows to evaluate basically anything to test whether what you expect to happen actually happened. As soon as things don't match you know that you've found an issue, either in your logic or in your code.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|