|
-
Jun 27th, 2001, 08:56 AM
#1
Thread Starter
Hyperactive Member
consecutive numbers
Hi,
I have a simple program like this:
Private Sub Command1_Click()
Dim the_number As Integer
the_number = Int(Rnd * 50)
Text1 = the_number
End Sub
So say Text1 comes up as '23'.
Then, when I click another button, command2, I want the sum of all numbers, from 1 to 22 (1+2+3+4...etc..+22) to appear in Text2.
Does anyone know how I could do this? I think it's some sort of Loop or something, but I'm not sure how.
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
|