User Form List Box

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
 
C

Charles

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
 
Top