vba select listbox item

spinkung

Registered User.
Local time
Today, 04:17
Joined
Dec 4, 2006
Messages
267
Hi

i'm trying to use this...
Code:
for i = i to myForm.myList.listcount -1
                If myForm.myList.Column(1, i) = myValueThen
                    myForm.myList.Selected(i) = True
                End If
next
...to select some items in a listbox. I've had this work on another list where the only differerence is the column ref. i used col(0) instead of col(1).

am i doing anything wrong here?

thanks
 
I don 't see where i is being incremented in your for/next loop :confused: and what is the starting value of i ?
 
Last edited:
i is set to 0 and increments at the next statement
 
Can you show us all of the code?
You need a space before Then

What dioes this represent
If myForm.myList.Column(1, i)?
 

Users who are viewing this thread

Back
Top Bottom