Mike_Wilson Posted October 26, 2004 Share Posted October 26, 2004 i have a multi-line textbox and I want to split it up into an array, ive being pratting about with it for a few hours but cant seem to get it to work :( anyone got any ideas on how I would do this thx :( Link to comment https://www.neowin.net/forum/topic/236026-vb-multi-line-textbox-into-array/ Share on other sites More sharing options...
0 Winston Posted October 26, 2004 Share Posted October 26, 2004 Mike_Wilson said: i have a multi-line textbox and I want to split it up into an array, ive being pratting about with it for a few hours but cant seem to get it to work :( anyone got any ideas on how I would do this thx :( 584809204[/snapback] do you mean for each line in the textbox u want to add that as an array item? Link to comment https://www.neowin.net/forum/topic/236026-vb-multi-line-textbox-into-array/#findComment-584809239 Share on other sites More sharing options...
0 Holes Posted October 26, 2004 Share Posted October 26, 2004 Dim blah() As String blah = Split(Text1.Text, 10) For x = LBound(blah) To UBound(blah) Debug.Print blah(x) Next x That should give you an idea. Link to comment https://www.neowin.net/forum/topic/236026-vb-multi-line-textbox-into-array/#findComment-584809260 Share on other sites More sharing options...
0 Mike_Wilson Posted October 26, 2004 Author Share Posted October 26, 2004 yes I want to use each line from the textbox and put it into its own array section so when I ask for i.e. array(1) it will give me line 1 and line 10 will be array(10) if thats possible ? Ill have a play with Holes code. cheers Link to comment https://www.neowin.net/forum/topic/236026-vb-multi-line-textbox-into-array/#findComment-584809295 Share on other sites More sharing options...
0 Holes Posted October 27, 2004 Share Posted October 27, 2004 The code i've posted... will give you exactly that! :) Apart from the lbound will be 0 and the ubound will be (number of lines - 1) Link to comment https://www.neowin.net/forum/topic/236026-vb-multi-line-textbox-into-array/#findComment-584814507 Share on other sites More sharing options...
Question
Mike_Wilson
i have a multi-line textbox and I want to split it up into an array, ive being pratting about with it for a few hours but cant seem to get it to work :( anyone got any ideas on how I would do this thx
:(
Link to comment
https://www.neowin.net/forum/topic/236026-vb-multi-line-textbox-into-array/Share on other sites
4 answers to this question
Recommended Posts