Results 1 to 4 of 4
  1. #1
    Silver Lounger
    Join Date
    Dec 2000
    Location
    California, USA
    Posts
    1,758
    Thanks
    0
    Thanked 0 Times in 0 Posts

    ComboBox Value (XP)

    Is it possible to determine the selection of the rowsource associated with the combobox created in a form? The example below would be the rowsource


    A1 = Text One
    A2 = Text Two
    A3 = Text Three


    If one uses ComboBox1.Value the actual text selected is returned. I'm looking for the position ie 1 or 2 or 3.

    Thanks,
    John

  2. #2
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: ComboBox Value (XP)

    Check out the listindex property.
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: ComboBox Value (XP)

    You can use the ListIndex property. This is zero-based, so you must add 1:

    ComboBox1.ListIndex + 1

    Note: if no item is selected, the ListIndex is -1.

  4. #4
    Silver Lounger
    Join Date
    Dec 2000
    Location
    California, USA
    Posts
    1,758
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: ComboBox Value (XP)

    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
  •