Results 1 to 5 of 5

Thread: Incrementing, well sort of... [resolved]

  1. #1

    Thread Starter
    Frenzied Member thegreatone's Avatar
    Join Date
    Aug 2003
    Location
    Oslo, Norway. Mhz:4800 x12
    Posts
    1,333

    Resolved Incrementing, well sort of... [resolved]

    Well, i have this coding that doesn't work, its meant to simply write the current "i" plus a comma to the textbox, but, it is not working, where have i gone wrong on this ?

    VB Code:
    1. Private Sub Command1_Click()
    2. Dim i As Integer
    3. For i = 1 To i = 49
    4.     Text1.Text = Text1.Text & "," & i
    5. Next
    6. End Sub
    Last edited by thegreatone; Jun 2nd, 2005 at 03:16 PM.
    Zeegnahtuer?

  2. #2
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913

    Re: Incrementing, well sort of...

    For i = 1 To 49

    Don't know where you got For i = 1 To i = 49 from.
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  3. #3
    Frenzied Member sciguyryan's Avatar
    Join Date
    Sep 2003
    Location
    Wales
    Posts
    1,763

    Re: Incrementing, well sort of...

    Change it too:

    VB Code:
    1. Private Sub Command1_Click()
    2. Dim i As Integer
    3. For i = 1 To 49
    4.     Text1.Text = Text1.Text & "," & i
    5. Next i
    6. End Sub

    Current i and a comma only

    Cheers,

    RyanJ
    My Blog.

    Ryan Jones.

  4. #4
    Lively Member
    Join Date
    Jul 2004
    Posts
    80

    Re: Incrementing, well sort of...

    VB Code:
    1. For i=1 to 49

  5. #5

    Thread Starter
    Frenzied Member thegreatone's Avatar
    Join Date
    Aug 2003
    Location
    Oslo, Norway. Mhz:4800 x12
    Posts
    1,333

    Re: Incrementing, well sort of...

    I'm stupid, forgot the For i = 1 to i = 49 being incorrect...
    Guess its the lack of sleep...

    Good rep for everyone for pointing that out,lol
    Zeegnahtuer?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width