Thread: help
View Single Post
Join Date: Jul 2008
Posts: 161
Reputation: ryan311 has a little shameless behaviour in the past 
Solved Threads: 1
ryan311 ryan311 is offline Offline
Junior Poster

Re: help

 
0
  #5
Jan 5th, 2009
comatose can u help me about this i have only 1 textbox and 2 command button

this is my code in command1 button
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. Private Sub Command1_Click()
  2. Dim x, n
  3. n = Val(Text1.Text)
  4. For x = 1 To n
  5. Print x
  6. Next x
  7. command1.enabled = false
  8. End Sub
the output of my command1 is for example i inputted a value of 3 in my textbox the output should come w/ this

1
2
3

this is the code in my 2nd button
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. Private Sub Command2_Click()
  2. Dim x, n
  3. n = Val(Text1.Text)
  4. For x = n + 1 To n * 2
  5. Print x
  6. Next x
  7. End Sub
the output of this is

4
5
6

if i click once again in my 2nd command button the answer is still 456 i want is like this if i click once again my second command button the answer should like this

7
8
9

if i click again

10
11
12

until he reach in 100.
Last edited by Ancient Dragon; Jan 5th, 2009 at 3:23 pm. Reason: add code tags
Reply With Quote