Results 1 to 4 of 4

Thread: [RESOLVED] Textbox load

  1. #1

    Thread Starter
    Fanatic Member vivek_master146's Avatar
    Join Date
    Apr 2006
    Location
    Delhi,India
    Posts
    787

    Resolved [RESOLVED] Textbox load

    This is a code to load textbox:

    Code:
    Private Sub generate()
    Randomize
    a = film(Rnd * 4 + 1)
    b = Len(a)
    For i = 1 To Len(b)
    Load Text1(i)
    Text1(i).Visible = True
    Text1(i).Left = Text1(i - 1).Left + 1000
    Next
    End Sub
    But only 2 textbox r loading even if the value of b is 6 or 7 or 10.
    Dont rely only on your luck. Work hard until You get success.
    vb Code:
    1. Private sub Time_ispassing
    2. While Me.Notgetsuccess
    3. trygain=tryagain+1
    4. Me.workhard
    5. wend
    6. end sub

  2. #2
    Fanatic Member robbedaya's Avatar
    Join Date
    Jul 2002
    Location
    Belgium
    Posts
    872

    Re: Textbox load

    replace
    Code:
    For i = 1 To Len(b)
    with
    Code:
    For i = 1 To b
    - Use the thread tools to Mark your Thread as Resolved when your question is answered.
    - Please Rate my answers if they where helpful.

  3. #3

    Thread Starter
    Fanatic Member vivek_master146's Avatar
    Join Date
    Apr 2006
    Location
    Delhi,India
    Posts
    787

    Re: Textbox load

    Thanks it worked. Actually b is already a integer. it is not a string. so there is no need to write len(b).This thing does not came in my mind. Thanks for help!
    Dont rely only on your luck. Work hard until You get success.
    vb Code:
    1. Private sub Time_ispassing
    2. While Me.Notgetsuccess
    3. trygain=tryagain+1
    4. Me.workhard
    5. wend
    6. end sub

  4. #4
    PowerPoster gavio's Avatar
    Join Date
    Feb 2006
    Location
    GMT+1
    Posts
    4,462

    Re: [RESOLVED] Textbox load

    Why exactly do you need b anyway?

    Code:
    For i = 1 To Len(a)
    2 Bytes more for your memory

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