Focus on Listbox, then select

K

Karen

After I set focus, with VBA, on a listbox; how can I also select the first item in the listbox?
 
J

jtoddspradlin

Try Me.ControlName.Selected(0) = True

where ControlName is the name of the listbox control. The
zero in parentheses refers to the first item in the
listbox. The second item would be 1, and the third would
be 2, etc.


-----Original Message-----
After I set focus, with VBA, on a listbox; how can I also
select the first item in the listbox?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top