Copy and paste into code pane.
I used VB6.
Dim SNumber, ENumber, INumber As Integer
Private Sub Command1_Click()
SNumber = CInt(Text1.Text)
ENumber = CInt(Text2.Text)
For INumber = SNumber To ENumber Step 1
List1.AddItem (INumber)
Next INumber
End Sub
'''Reset
Private Sub Command2_Click()
Text1.Text = ';';
Text2.Text = ';';
List1.Clear
End Sub
Private Sub Form_Load()
Text1.Text = ';';
Text2.Text = ';';
End Sub
: )
In Visual Basic, how do I list all the numbers between two numbers in ascending order?
something like this
input a, b
for x = a to b
print x
next x
just use forloop ..........
No comments:
Post a Comment