|
-
Oct 14th, 2001, 10:36 AM
#1
Thread Starter
Addicted Member
Showing all in between...
As a part of an app im making, I would like there to be a part that generates numbers. Not randomly, but in text1 they put in the starting number, and in text 2 they put in a finishing number, and hit generate (command1). how could i do this?
oh yeah, i would like all the numbers to show up in text3. BUT on seperate lines! ie:
Start #: 1 End #: 20
|_____Generate_____|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
See, just like that. I have been funbling with this one for a while. Its a small portion, but I cant finish without it. any help would be greatly appreciated!
Gray FOX: "Only a fool, trusts his life to a Weapon!"
Bart Simpson: "Bart no like! Baaad medicene!"
www.sling.to/dementia-freaks <<<---Goto my site!
http://pub80.ezboard.com/bdementiafreaksforum <<<---Goto my forum!
Thats it!
-
Oct 14th, 2001, 10:38 AM
#2
Member
VB Code:
For i = Val(txtStart.Text) To Val(txtEnd.Text)
txtNumbers.Text = txtNumbers.Text & i & vbCrLf
Next i
txtNumbers.Text = Left$(txtNumbers.Text, txtNumbers.Text - 1)
-
Oct 14th, 2001, 10:41 AM
#3
-= B u g S l a y e r =-
VB Code:
Private Sub Command1_Click()
Dim i As Integer
Dim s As String
For i = Val(Text1.Text) To Val(Text2.Text)
s = s & i & vbCrLf
Next i
Text3.Text = s
End Sub
-
Oct 14th, 2001, 10:46 AM
#4
Member
Jeez, again peet has to nuke a thread!
-
Oct 14th, 2001, 10:48 AM
#5
Thread Starter
Addicted Member
those work, but peets overflows at 6 numbers. it to handle 11 numbers. MAX.
Gray FOX: "Only a fool, trusts his life to a Weapon!"
Bart Simpson: "Bart no like! Baaad medicene!"
www.sling.to/dementia-freaks <<<---Goto my site!
http://pub80.ezboard.com/bdementiafreaksforum <<<---Goto my forum!
Thats it!
-
Oct 14th, 2001, 10:49 AM
#6
-= B u g S l a y e r =-
oh.. sorry filburt... and u actually posted some code ?? Shame on me !
-
Oct 14th, 2001, 08:39 PM
#7
PowerPoster
Originally posted by Dementia Freaks
those work, but peets overflows at 6 numbers.
Hmmm Are u sure? Apart from wording I cant see any diff betw Peet's code and the turtle (except the subtraction of the vbcrlf)
Regards
Stuart
-
Oct 15th, 2001, 12:09 AM
#8
-= B u g S l a y e r =-
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
|