Select in list box

  • Thread starter Thread starter Jamie
  • Start date Start date
J

Jamie

Hi

Is it possible to let the user to select all the items
in a list box by clicking in a radio bottom

I have two bottoms:
first: optAllCommands
Second: OptRestore

When the client choose optAllCommands, all the commands
in the list box will be choosen

When the client choose OptRestore, all the commands will
be deselected

Is it possible to do that thanks

Jamie
 
In your optAllCommmands command you may want to try
Dim x As Integer
For x = 0 To Listbox.ListCount - 1
Listbox.Selected(x) = True
Next x

Under your optRestore command
Dim x As Integer
For x = 0 To Listbox.ListCount - 1
Listbox.Selected(x) = False
Next x

You'll need to change the term "Listbox" to your actual
Listbox name on your form.

Hope it works!
 
Back
Top