Hello Everyone,
I have a multi-line text box that people will will cut and paste numbers from an excel file from. Once the numbers are pasted into the text box I split the lines like this (found it on the internet somewhere):
I then want to wrap single quotes around each number like this: '1' the code I am using for that is:
However, when I run the code the following happens:
First number looks correct: '1'
The rest of the numbers look like there is a return character in front of the number so it looks like this:
'
2'
How do I split the multi-line textbox and get the values into an array that has an output of: '1' '2' '3' etc...?
I am new to VB.NET and have been searching for an answer. Any help would be appreciated.
Thanks. Mike
I have a multi-line text box that people will will cut and paste numbers from an excel file from. Once the numbers are pasted into the text box I split the lines like this (found it on the internet somewhere):
VB.NET:
Dim strArr() As String = Me.txtInputSerials.Text.Split(ChrW(10))
I then want to wrap single quotes around each number like this: '1' the code I am using for that is:
VB.NET:
For i As Integer = 0 To Me.txtInputSerials.Text.Split(ChrW(10)).Length - 1
MsgBox("'" & strArr(i) & "'")
Next
However, when I run the code the following happens:
First number looks correct: '1'
The rest of the numbers look like there is a return character in front of the number so it looks like this:
'
2'
How do I split the multi-line textbox and get the values into an array that has an output of: '1' '2' '3' etc...?
I am new to VB.NET and have been searching for an answer. Any help would be appreciated.
Thanks. Mike