Select in list box

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
 
W

Whit

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!
 

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