ListIndex problems,

ListIndex problems,

Post by TXIuIEdldF » Wed, 23 Dec 2009 06:40:01

Hey, on the below code, I am having problems. i dont know why it is not
selecting the same row in list box 101 as in listbox 102
Sub Item_CustomPropertyChange(ByVal ListBox101)

Set ListBox101 = Item.UserProperties("ListBox101")
Set ListBox102 = Item.UserProperties("ListBox102")

ListBox102.ListIndex = ListBox101.ListIndex

End Sub

1. Combobox listindex problem

2. comboBox - Set ListIndex Problem

I am trying to set the .ListIndex property of a combobox to the index
corresponding to an item in the list by utilizing the string value of the
indexed item.

For example, I know that I can set the item displayed to the first one by
setting the list index to 0, as follows,

With cboRecipientName

.AddItem "Name1"
.AddItem "Name2"
.AddItem "Name3"

End With

.ListIndex = 0

What I would like to do is as follows

With cboRecipientName

.AddItem "String1"
.AddItem "String2"
.AddItem "String3"

End With

'Psuedo Code to set the item displayed
cboRecipientName.ListIndex = ListIndex of item whose string value is

So, I guess in general, I am asking for how to return the ListIndex of an
item by using the item's string value.



3. ListIndex problem

4. listbox listindex problem

5. Combo Box and ListIndex problem

6. Listindex problems in multicolumn listbox

7. Combobox listindex problem

8. ComboBox Problem with ListIndex

9. Problem with ListIndex = 0 in an AfterUpdate Event

10. Listindex strange problem

11. Userform problem (Listindex)

12. listindex error.

13. Seting the listindex doesn't work...

14. "You've used the ListIndex property incorrectly" message