I'm trying to attach a text file with my data for an array Visual Basic, in Visual Studio 2012.
How do you deliminate new values in the array? I've tried new lines, commas, quotes and it still reads it all as
arrayname(0)
I'm trying to attach a text file with my data for an array Visual Basic, in Visual Studio 2012.
How do you deliminate new values in the array? I've tried new lines, commas, quotes and it still reads it all as
arrayname(0)
You probably need a split() function. How is the text file organized? Are all the values separated by newlines?
Dim arrayname() As String
Dim text_string As String
text_string = "whatever you need to import from text file"
arrayname() = Split(text_string, " ") 'example splitting using spaces
output:
arrayname(0) = "whatever"
arrayname(1) = "you"
...
I figured it out