can someone help me using nested while wend,in vb6

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sweetzhay
    New Member
    • Sep 2009
    • 5

    can someone help me using nested while wend,in vb6

    i already know how to get the output of
    1
    12
    123
    1234
    12345
    using while wend
    and now my problem is to show the output of
    1
    21
    321
    4321
    54321
    using while wend with one command button and 1 label
    and also
    this one
    using 2 labels and 1 command button need to to show in one label the even numbers
    2 4 6 8 10
    and the in label 2 need to show the odd numbers
    1 3 6 9
    hope someone can help me. thanks alot
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    kindly post the code that you are working on.

    Comment

    • sweetzhay
      New Member
      • Sep 2009
      • 5

      #3
      heres the code

      Originally posted by debasisdas
      kindly post the code that you are working on.
      heres the code for the output
      1
      12
      123
      1234
      12345

      Private Sub Command1_Click( )
      Label1 = ""

      sides = 5
      rows = 1
      While rows <= sides
      Column = 0
      While Column < rows
      Column = Column + 1
      Label1 = Label1 & Column
      Wend
      Label1 = Label1 & vbCrLf
      rows = rows + 1
      Wend
      End Sub

      so now i want to get the output of
      12
      21
      321
      4321
      54321
      and also this one
      ''''''''''''''' '''''''''''''1
      ''''''''''''''' ''''''''''12
      ''''''''''''''' '''''''123
      ''''''''''''''' ''''1234
      ''''''''''''''' '12345
      disregard'''' i just put it to get the right position of the numbers only the numbers.
      the secret in the last one is to use double quotation" '" for the space so the more space the more double quatotion needed by still i cannot get it hope u can help me.

      Comment

      • kadghar
        Recognized Expert Top Contributor
        • Apr 2007
        • 1302

        #4
        well

        i think you just have to start column in row, instead of zero
        and use column=column-1

        oh, and change the condition of the while

        Comment

        Working...