Results 1 to 3 of 3

Thread: [RESOLVED] IS there a more efficient way to copy from a list to a text box array

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    May 2006
    Posts
    2,295

    Resolved [RESOLVED] IS there a more efficient way to copy from a list to a text box array

    Hi there! I am working on a listbox that is called StudentList. It has a list of student names, and I recently reordered their names in alphabetical order, and now would like to copy them one by one to a text box array. There are 31 in the array from 0-30, and the text box is called StudentNameTXT.text

    Is there a more efficient way to copy them over than me going something like.

    StudentNameTXT(0).text = Studentlist.listindex (0)
    StudentNameTXT(1).text = Studentlist.listindex(1)
    StudentNameTXT(2).text = Studentlist.listindex(2)

    ... etc?

    Thank you!!

  2. #2
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    14,205

    Re: IS there a more efficient way to copy from a list to a text box array

    From a typing standpoint yes, you could use a loop

    Code:
    For x=0 to 30
        StudentNameTXT(x).text = Studentlist.list(x)
    Next

  3. #3

    Thread Starter
    PowerPoster
    Join Date
    May 2006
    Posts
    2,295

    Re: IS there a more efficient way to copy from a list to a text box array

    Marvelous thank you!

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