-
I am taking an introduction to Visual Basic 6.0 class at a community college. The program I'm working on will calculate payments for a car loan. This exercise requires that the various interest rates be displayed in a listbox. Rather than keying in each entry, I want the program to figure out all the values using the For Next statement with values of 7.00% to 12.00% in steps of .25%, then add those values to the ListBox when the program loads. Appreciate an example!
-
Try something like this:
Code:
Private Sub Command1_Click()
Dim i As Single
List1.Clear
For i = 7 To 12 Step 0.25
List1.AddItem i
Next i
End Sub
Be sure to have a button (Command1) and a listbox (List1)
All that really does when you click on Command1 is put values in the listbox like:
7
7.25
7.5
7.75
8
8.25, etc.
------------------
Tom Young, 14 Year Old
[email protected]
ICQ: 15743470 Add Me ICQ Me
AIM: TomY10
PERL, JavaScript and VB Programmer