I want to set up an array and have 100+ items in the array anyone know how to split the line

Dim row() As Integer = {1, 2, 3, 4, 5, 6}

like this

Dim row() As Integer = {1, 
                        2, 
                        3, 
                        4, 
                        5, 
                        6}

If I had to it I would load the code into a text editor (like TextPad) that supports regular expressions and change "," to ",\n". If you don't have one then copy the following code into a file named (as an example) change.vbs.

text = "Dim row() As Integer = {1, 2, 3, 4, 5, 6}"
wscript.echo Replace(text,",","," & vbcrlf)

Replace the string in line 1 with your actual string, then run from the command line by

cscript change.vbs

Copy and paste the output into your code winidow.

use loop to insert your data in array , and then print then in textbox and manually use vbCrLf after printing each value , your data will be in your required format .

Regards

You could also use:

string.Split(New Char(","c)
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.