ListIndex problem

ListIndex problem

Post by nodd » Tue, 11 Sep 2007 07:28:09


I have the following line of code

List1.ListIndex = n

When n is >0 the correct list item is highlighted as selected.
However when n=0 the first item in the list is not selected.

How do I select the first item in the list?

TIA
Nod
 
 
 

ListIndex problem

Post by nodd » Tue, 11 Sep 2007 07:38:31

OOPS SORRY to waste your time

Before the list displayed I also had the code

If n then
List1.ListIndex = n
endif

 
 
 

ListIndex problem

Post by shamela.w » Sat, 22 Sep 2007 18:38:57

You should write this

List1.ListIndex = n
List1.Selected(n)=True