array problem

kkocak

Registered User.
Local time
Today, 09:31
Joined
Jan 12, 2007
Messages
13
Private Sub OpenToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OpenToolStripMenuItem.Click

OpenFileDialog1.FileName = "Select File"
If OpenFileDialog1.ShowDialog = Windows.Forms.DialogResult.Cancel Then
Return
End If
OpenFileName = OpenFileDialog1.FileName
ReDim Array(My.Computer.FileSystem.ReadAllText(OpenFileName))

TextBox1.Text = Array

End Sub


I am trying to use the above code to read a text file full of numbers and print it off to a textbox. i get an error that says,

Error 1 Value of type '1-dimensional array of String' cannot be converted to 'String'

also i do realize that i dont have to load it in an array, but i am working with 2 sets of numbers: and ID tag and another number

66666 123
11111 234
44444 235
77777 111

the text file i am uploading looks something like that.
 

Users who are viewing this thread

Back
Top Bottom