Hello Fellas, have been at this for the longest and I am not sure whats wrong.
I am using Visual basics 2010 and I am trying to use the MID function with the following code.
Dim homesaverStorage1 As String = Mid(Textbox2.Text, 1, 255)
Dim homesaverStorage2 As String = Mid(Textbox2.Text, 255, 255)
Dim homesaverStorage3 As String = Mid(Textbox2.Text, 511, 255)
Dim homesaverstorage4 As String = Mid(Textbox2.Text, 767, 255)
Dim homesaverstorage5 As String = Mid(Textbox2.Text, 1023, 255)
Homesaver1.Text = homesaverStorage1
homesaver2.Text = homesaverStorage2
homesaver3.Text = homesaverStorage3
homesaver4.Text = homesaverstorage4
homesaver5.Text = homesaverstorage5
so basically I have textbox2 and I am trying to break up whats in textbox2 into 5 boxes. Each box can hold only 255 characters. So far so good. Ok here is my problem, in homesaver3.text I am missing a character, and the same with homesaver4.text . Lets say for instance I have a group of numbers in these boxes:
"1234 1234 1234 1234 1234 1234 1234 1234 1234 1234"
So lets say the 255th character stoped at 2 , it will display in one box
output in the boxes
Homesaver2.text will show 1234 1234 1234 1
homesaver3.text will show 34 1234
its suppose to be like this
1234 1234 1234 1
234 1234
it keeps eating up a character if the word is cut off in one box and needs to continue in another box.
I want to thank you guys in advance for your time. :)
Using the mid function for some reason makes me lose one character, would someone out thier be able to tell me why or how do I fix this, or should I not even use the mid function at all :(
I am using Visual basics 2010 and I am trying to use the MID function with the following code.
Dim homesaverStorage1 As String = Mid(Textbox2.Text, 1, 255)
Dim homesaverStorage2 As String = Mid(Textbox2.Text, 255, 255)
Dim homesaverStorage3 As String = Mid(Textbox2.Text, 511, 255)
Dim homesaverstorage4 As String = Mid(Textbox2.Text, 767, 255)
Dim homesaverstorage5 As String = Mid(Textbox2.Text, 1023, 255)
Homesaver1.Text = homesaverStorage1
homesaver2.Text = homesaverStorage2
homesaver3.Text = homesaverStorage3
homesaver4.Text = homesaverstorage4
homesaver5.Text = homesaverstorage5
so basically I have textbox2 and I am trying to break up whats in textbox2 into 5 boxes. Each box can hold only 255 characters. So far so good. Ok here is my problem, in homesaver3.text I am missing a character, and the same with homesaver4.text . Lets say for instance I have a group of numbers in these boxes:
"1234 1234 1234 1234 1234 1234 1234 1234 1234 1234"
So lets say the 255th character stoped at 2 , it will display in one box
output in the boxes
Homesaver2.text will show 1234 1234 1234 1
homesaver3.text will show 34 1234
its suppose to be like this
1234 1234 1234 1
234 1234
it keeps eating up a character if the word is cut off in one box and needs to continue in another box.
I want to thank you guys in advance for your time. :)
Using the mid function for some reason makes me lose one character, would someone out thier be able to tell me why or how do I fix this, or should I not even use the mid function at all :(