Thread: help
View Single Post
Join Date: Dec 2004
Posts: 2,413
Reputation: Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough 
Solved Threads: 211
Team Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Taboo Programmer

Re: help

 
0
  #2
Jan 5th, 2009
  1. Dim LastNum As Integer
  2.  
  3. Private Sub Command1_Click()
  4. Dim NewNum As Integer
  5. Dim I As Integer
  6.  
  7. If Text1.Text = vbNullString Then
  8. MsgBox "Enter A Value"
  9. Exit Sub
  10. End If
  11.  
  12. NewNum = LastNum + Val((Text1.Text) - 1)
  13.  
  14. Text2.Text = vbNullString
  15. For I = LastNum To NewNum
  16. Text2.Text = Text2.Text & I & " "
  17. Next I
  18.  
  19. LastNum = I
  20.  
  21. End Sub
  22.  
  23. Private Sub Form_Load()
  24. LastNum = 1
  25. End Sub
Reply With Quote