Focus on Listbox, then select

  • Thread starter Thread starter Karen
  • Start date Start date
K

Karen

After I set focus, with VBA, on a listbox; how can I also select the first item in the listbox?
 
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?
 
Back
Top