Auto check list box

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a listbox that automatically generates with a list of all the states.
It is set up for option button (fmListStyleOption) and multi-select enabled.
How can I select all of the states by default, given the user to option to
remove if necessary but not need to add if they want to go nationwide?

Thanks in advance.
 
Paul

Add this to your initialize event after populating the listbox

Dim i As Integer
For i = 0 To ListBox1.ListCount - 1
ListBox1.Selected(i) = True
Next i

Regards
Rowan
 

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

Back
Top