What I discovered is that when you use a listbox with the Multi Select property set to 'Extended' the myListbox.SetFocus command is not needed.
I solved my problem by eliminating all myListbox.Setfocus commands and using myListbox.Selected(lngRowNo)= True followed by myListbox.Value =...
The Multi Select property for this listbox is set to 'Extended'.
If you use myListbox.Setfocus followed by myListbox.Selected(5)=True the focus remains on row 0 (or row 1 if you use column headers) and row 6 is highlight/selected.
To make both appear on the same row I can use Sendkeys...
If I use myListbox.Selected(5)= True I can "HighLite"/Select row 6 in the listbox. How do I move the focus to the same row without resorting to Sendkeys "{DOWN 6}" ? Robin Roslansky
Jakarta, Indonesia
Scoty
In reference to your answer how do you move the focus to a listbox row that is selected? Without using Sendkeys "{DOWN 4}" ? Robin Roslansky
Jakarta, Indonesia
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.