Results 1 to 3 of 3

Thread: Select name from listbox

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2003
    Posts
    305

    Red face Select name from listbox

    Hey,im wonderin i have around 200+ names in a listbox,im wanting to go through all names 1 by 1 into text box example:

    will select the first name from the list box then put it into the text box,i cud have this on timer,so every like 30 secs it will select each name into the text box,but only 1 name at time thanks

  2. #2
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Re: Select name from listbox

    Private Sub Timer1()
    Text1 = List1.List(List1.Listindex+1)
    if List1.Listindex = list1.Listcount -1 then Timer1.enabled = false
    End Sub
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  3. #3
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Select name from listbox

    VB Code:
    1. Option Explicit
    2.  
    3. Private intIndex As Integer
    4.  
    5. Private Sub Timer1_Timer()
    6. Text1.Text = List1.List(intIndex)
    7. intIndex = intIndex + 1
    8. End Sub
    I had the timer interval set at 1000. You will probably want to play with that until it is just right for 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