Results 1 to 3 of 3

Thread: suspend sor next loop ??

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jan 2010
    Posts
    20

    suspend sor next loop ??

    is there anyway to suspend a for next loop until a textbox has been filled in and the keyboard enter has been press



    Dim playersname(7) As String
    Dim players As Integer = 7

    For player = 1 To players
    playersname(players) = TextBox1.Text
    Next

    Thx

  2. #2
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: suspend sor next loop ??

    Thread moved from 'Database Development' forum to 'VB.Net' (VB2002 and later) forum.

  3. #3
    Hyperactive Member nepalbinod's Avatar
    Join Date
    Sep 2007
    Posts
    293

    Re: suspend sor next loop ??

    You can use Exit For to Break a loop. Example

    Code:
    Dim playersname(7) As String
    Dim players As Integer = 7
    
    For player = 1 To players
    playersname(players) = TextBox1.Text
    
       If SomeCondition = True Then
           Exit For
       End if
    Next

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