Listbox display (1 Viewer)

RienTimmer

New member
Local time
Today, 10:40
Joined
Jun 30, 2008
Messages
3
Hi,

I have a listbox on a form where I use the Extended multi-select.
After selecting multiple values I hit a button and my VBA code starts processing the selected rows, deselecting the rows as they are processed.
During this process the listbox displays as I last used it i.e. it does now reflect the row being processed and does not move; you see the rows being deselected as the processing progresses through the rows displayed in the box.
Is it possible to have the listbox display a 'current' row, i.e. scroll the box from VBA?

Something like:

Me.lstRecipients.Selected(row) = False
Me.lstRecipients.Display?=row
Me.lstRecipients.ScrollDown?
 

wazz

Super Moderator
Local time
Today, 16:40
Joined
Jun 29, 2004
Messages
1,711
ListIndex might get you what you need.
 

RienTimmer

New member
Local time
Today, 10:40
Joined
Jun 30, 2008
Messages
3
Not quite.

Using ListIndex gives me the "You've used the ListIndex property incorrectly" message.
I've searched for the cause and I read that is because the control does not have focus, but when I add the .SetFocus for the control, that causes all my selected listitems to be deselected...
 

Users who are viewing this thread

Top Bottom