Results 1 to 3 of 3

Thread: variable inside variable not an array

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2005
    Location
    earth
    Posts
    89

    variable inside variable not an array

    ok i need to put variable inside a variable BUT IT CAN NOT BE AN ARRAY lol everyones telling me just do it it an array i cant becuase of other part of the program trust me ... so im going to try to make this simple i need somehting like this

    VB Code:
    1. for i% = 1 to 50
    2. lbl{i%}.caption = i% ' this is the line i dont know how to do
    3. next i%

    how do i get the i% in there so it will seem like lbl1.caption or lbl100.caption
    Aim: zhahaman2001

  2. #2
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758

    Re: variable inside variable not an array

    Use the Controls collection of the Form.

    VB Code:
    1. for i% = 1 to 50
    2.    Me.Controls("lbl" & i%).caption = i% ' now you know how to do it.
    3. next i%

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jan 2005
    Location
    earth
    Posts
    89

    Re: variable inside variable not an array

    thx man
    Aim: zhahaman2001

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