multi selection list as text?

  • Thread starter Thread starter HotRod
  • Start date Start date
H

HotRod

Is it possible to create a list in a cell that allows for multiple
selections and then shows these selections in the cell as plain text? This
works fine as a single selection but I have not been able to get it to work
as a "list box" or a "combo box". Don't get me wrong I can make the
selections but they are not placed in the cell as text (So that I can't cut
and paste)
 
You can't link a multiselect listbox to a cell so that the cell displays the
multiple selections. You can use event code to loop through the list and
built a string of selected items, then write that to the cell.

Private Sub commandbutton1_click()
Dim i as long, msg as string
with me.Listbox1
for i = 0 to .listcount -1
if .selected(i) then
msg = msg & .list(i) & vbLf
end if
Next
End with
Activesheet.Range("B9").Value = msg
end Sub

--
Regards,
Tom Ogilvy


The concept of a multselect combobox escapes me.
 

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