Results 1 to 3 of 3

Thread: Grabbing random combobox value

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2009
    Location
    Scotland
    Posts
    417

    Grabbing random combobox value

    Hi Guys,

    I have a combo box with 20 items in it, i was wondering if it was possible to grab an item at random and display it, i'm not sure what code i would need , any help would be appreciated

    thanks guys

    Graham

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

    Re: Grabbing random combobox value

    vb Code:
    1. dim randomNumber as new random
    2. msgbox(combobox1.items.item(randomNumber.next(0, combobox1.items.count)))

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2009
    Location
    Scotland
    Posts
    417

    Re: Grabbing random combobox value

    thanks paul

    Graham

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