User Form List Box

  • Thread starter Thread starter Hank Hendrix
  • Start date Start date
H

Hank Hendrix

I have a user form with several prepared statements that are available and
can be added to a selected cell. Most often multiple statements will be
needed.
At present I must select one statement - close the user form - reopen it and
add another---till all needed statements are added.

How can I select several statements from the list and have them added to the
cell as they are selected. AND/OR when I select click on a statement it
would appear in the cell. If I click on the same statement again it would
be removed from the cell.

Hank
 
Hank,


Open VBA open properties and Set your listbox to Multiselect.
this should allow you to select more than one item. You will have t
modify your code to something like:

Private sub do_loop
dim i as long
for i = 0 to listbox1.listcount -1
If listbox1.selected(i) then
your code goes here
next i
end sub

Hope this will get you going

Charle
 

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