hi,
list boxes aren't populated that way.
paste your data on a sheet. in design mode, right click the list box, click
properties.
set the column count property to the number of columns you want which is 3.
set the row source property to the range of your data on the sheet and add
the number indexes to the list. the row source property would look something
like
A1:C20.
and you wont be able to drag and drop from the list box to the text box. you
will have to write code to transfer from the list box to the text box using
most probably the list box click event.
remember. controls don't work like the sheet. not even close. whole
different ball game.
press Alt+F11 on the keyboard. in the
VB editor, click help. type list box.
read up on it . you may find some sample code to help. if not post back here
for more help.
Regards
FSt1
"pdp-11" wrote:
How do I paste some lines of text into a multicolumn listbox on a
userform? The text will be pasted to the clipboard from. typically, a
text editor. It would be a variable number of lines of text, say 20+.
Then on clicking or tabbing to the listbox to give it the focus I want
to Ctrl-v to paste the text into column 2.
In addition to pastng the text the listbox event would add a line
number in column 1. So if the text on the clipboard was:
Tom
Dick
Harry
This would appear in the listbox as:
1 Tom
2 Dick
3 Harry
I can't even work out which event to use to do the paste.
Grateful for any code segments or pointers.
....then once it's in the listbox the user can drag and drop from the
listbox to a textbox on the same form but we'll leave this for later.
Thanks