0

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}

Edited by Dani: Formatting fixed

4
Contributors
3
Replies
4
Views
5 Years
Discussion Span
Last Post by Begginnerdev
0

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.

0

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

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.