Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiline Combobox

Status
Not open for further replies.

suoirotciv

Programmer
Dec 3, 2002
205
0
0
PH
Is there a way that i can view with combobox, my data that is multiline? I mean like in excel that has the property or option to automatically wrap the cell. If this thing is not possible with Combobox, is it possible to Listbox? Please pardon the grammar.
Not good in english.
 
You could always just run through the text using the "instr()" function checking where the next vbCRLF came. Every time you find one, reset the current "start position" to just after it, take that text (by using left() and right() with the position of the new vbCRLF and the position of the last one to get just that text), and insert it into a ListBox using AddItem(). Of course, that isn't as simple as finding some builtin function, but as long as you can get the text from the original source, it oughta work. This is providing all the text you want comes from one cell/source/whatever. If you are talking about taking from different cells, well, I know nothing about Excel code.

Jek
 
To add to what Jekteir was saying, you could use the split function to split a multiline string on the vbcrlf character. Your result would be an array that could easily be added to a combo or list box via the .additem method. Thanks and Good Luck!

zemp
 
Jek and Zemp . . . thanks for the idea . . . but i already done that actually that is by default . . . but my user want the way i ask it, she want to view it the way she type it . . . this is just if this thing is possible or not . . .

again tnx Please pardon the grammar.
Not good in english.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top