Results 1 to 3 of 3

Thread: Very Basic Combo Box question

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Aug 2001
    Location
    US
    Posts
    102

    Arrow Very Basic Combo Box question

    For some reason I can not figure out how to add stuff to a combo box. I am missing something, but not sure what.

    I would like a drop down list of the diff states that the user would select and whatever they select needs to be used later. (set it = to a variable) So I made my little combo box, tried to add but am not calling something right. I know this is prob very basic and easy but I couldn't find it on the web already, since it is too easy. Thank you for your help.

  2. #2
    PowerPoster beachbum's Avatar
    Join Date
    Jul 2001
    Location
    Wollongong, NSW, Australia
    Posts
    2,274
    LOL
    i just know Nucleus will beat me to finish this!!

    In say a button click or form load event

    Combo1.Clear
    Combo1.Additem "Blah"
    Combo1.Additem "Again"
    Combo1.Listindex = 0

    You get the selected item's index from the Listindex property when you click the Combo box.

    MyVar = Combo1.ListIndex

    The selected item can also be gained from

    MyString = Combo1.List(Combo1.Listindex)

    Regards
    Stuart
    Stuart Laidlaw
    Brightspark Financial Software
    http://www.gstsmartbook.com

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Aug 2001
    Location
    US
    Posts
    102
    Thanks Beachbum!

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