Selecting multiple lines in a VBA listbox?

A

andy.novak

Is it possible for a user to select multiple lines in a VBA listbox in
a Form? If some other toolbox item, what?

I tried the Ctrl key and Shift key but neither provided that
capability.

If so, how do you determine when processing through the list which
ones are selected / highlighted?

We were using combo boxes exclusively but I wanted to use a list box
to hopefully allow users to pick which project(s) they own they want
to close that are < 100%. I've got the SQL working, but not sure how
to pick the project names.

I figured checkboxes out to the side wouldn't work because they only
pertain to the items that are visible in the listbox at the time.

Many thanks ahead of time for the help.

Thanks,
Andy Novak
UNT
 
R

Rod Gill

Hi,

In the VBE you need to change the MultiSelect property of the Listbox first.
Set it to frmMultiSelectMulti

--

Rod Gill
Microsoft MVP for Project - http://www.project-systems.co.nz

Author of the only book on Project VBA, see: http://www.projectvbabook.com




Is it possible for a user to select multiple lines in a VBA listbox in
a Form? If some other toolbox item, what?

I tried the Ctrl key and Shift key but neither provided that
capability.

If so, how do you determine when processing through the list which
ones are selected / highlighted?

We were using combo boxes exclusively but I wanted to use a list box
to hopefully allow users to pick which project(s) they own they want
to close that are < 100%. I've got the SQL working, but not sure how
to pick the project names.

I figured checkboxes out to the side wouldn't work because they only
pertain to the items that are visible in the listbox at the time.

Many thanks ahead of time for the help.

Thanks,
Andy Novak
UNT

__________ Information from ESET Smart Security, version of virus
signature database 5164 (20100601) __________

The message was checked by ESET Smart Security.

http://www.eset.com

__________ Information from ESET Smart Security, version of virus signature database 5164 (20100601) __________

The message was checked by ESET Smart Security.

http://www.eset.com
 

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