CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Making a loop

  1. #1
    Join Date
    Jun 2014
    Posts
    1

    Making a loop

    I have a code that loop from A to D and displays the result in a text box as the loop continues.

    Dim test(0 To 3) As String

    test(0) = "A"
    test(1) = "B"
    test(2) = "C"
    test(3) = "D"

    For i As Int32 = 0 To test.Length - 1
    TextBox4.Text = test(i)
    TextBox4.Refresh()
    Me.Refresh()
    Next

    But the problem is that the loop only goes like A , B , C ,D
    How can I make the loop so it keep going on like
    A
    B
    C
    D
    AA
    AB
    AC ....and so on?

  2. #2
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,362

    Re: Making a loop

    Not sure what you are asking, you are only executing 4 cycles of the loop and you only have 4 values
    There are numerous ways you could make it do the little bit you showed but not sure what ..... and so on really means. Does it stop at AD or do you want to go to AAA, AAB ..... ABA, ABB ..... DDDDDDDDD ?
    Always use [code][/code] tags when posting code.

Tags for this Thread

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

Featured