Results 1 to 2 of 2

Thread: [RESOLVED] simple question - How to set a listbox item no. 2 to selected ?

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2011
    Posts
    467

    Resolved [RESOLVED] simple question - How to set a listbox item no. 2 to selected ?

    Hi, i want to click a button and it will select the number 2 item in a listbox ?

    I have this but it does not work :/

    Code:
    ListBox2.SelectedItem = 2
    Thanks

    EDIT: nvm, i found it
    Code:
     ListBox2.SetSelected(2, True)
    I tryed google the first time but used the wrong search method lol, finially found it tho

    Thanks
    Last edited by SystemX; Oct 20th, 2011 at 04:20 PM.

  2. #2
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    26,415

    Re: [RESOLVED] simple question - How to set a listbox item no. 2 to selected ?

    vb Code:
    1. ListBox2.SelectedIndex = 2

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