Re: Combobox listindex confusion



Ahhhh.. OK that nested Object. List(Object . Property)
I see.

Thanks for putting me back on track~!

"Ivar" <ivar.ekstromer000@xxxxxxxxxxxx> wrote in message
news:o9eVf.6706$g76.6463@xxxxxxxxxxxxxxxxxxxxxxx
StrReturn = Combo1.List(Combo1.ListIndex)
or
StrReturn = Combo1.Text

"AK" <nospam@xxxxxxx> wrote in message
news:wrdVf.14478$1Z5.12991@xxxxxxxxxxxxxxxxxxxxxxx
I'm confused,

I have a dropdown combobox. cboItemNames

I populate the list with an Open file, Do Loop, and read the item names
into the list using the the AddItem method.

Populates OK. The names of the items show up fine in my dropdown.

How do I access the Item Name fot the item that has been selected in that
dropdown.

I did a selection from the cbobox and but when I execute a
Debug.Print cboItemNames.List Index
I find that I am getting the index number associated with the item, not
the name. Was thinking that without a () at the end it would have
returned the name of the item.


Sooo.......How do I return the name associated with the index number of
the chosen item, not the number?

I'm just having a brain lock.


Thanks

AK





.



Relevant Pages

  • Re: Populating text boxes with macros in dropdowns
    ... Code such as the following can be used to populate a formfield with an ... autotext entry that corresponds to an item selected from a dropdown type ... items from dropdowns in a list of contents that will then populate text ... in other areas of the document with information relevant to the selection ...
    (microsoft.public.word.vba.general)
  • Re: WebPart Postback
    ... Dropdown_Load event to populate the dropdown from the existing list ... In the Load event populate the Dataset and put the dataset in a Session ... Create a new button event handler, populate the datagrid from the ... Dim oSite As SPSite ...
    (microsoft.public.sharepoint.portalserver.development)
  • Re: SQL Query - Populate Drop Down
    ... League - connected to - Division - connected to Team ... next page populate a dropdown with all the divisions in that league. ... You should supply a few rows of sample data, ...
    (microsoft.public.inetserver.asp.db)
  • Re: Automatic population of text boxes from dropdown selections
    ... Greg Maxey/Word MVP ... items from dropdowns in a list of contents that will then populate text ... in other areas of the document with information relevant to the selection ... made in the dropdown e.g. if the user selects apples from the drop down ...
    (microsoft.public.word.docmanagement)
  • Re: SQL Query - Populate Drop Down
    ... League - connected to - Division - connected to Team ... page populate a dropdown with all the divisions in that league. ... You should supply a few rows of sample data, ...
    (microsoft.public.inetserver.asp.db)