If I want to read a certain line of a text box, and then place that string of data in another text box, I do it like this:
Private Sub Command1_Click()
Dim vlines() As String
vlines = Split(Text1.Text, vbCrLf)
Text2.Text = Mid$(vlines(1), 25)
End Sub
The above code reads line 1 of information of multiline Text1.Text and then places it in Text2.Text and it takes the text from the 25th character of that line forward.
BUT.....how do I start at the 25th character and stop at the 30th?
Can someone please modify the above code to show me an example of how to do it?
Thanks
Private Sub Command1_Click()
Dim vlines() As String
vlines = Split(Text1.Text, vbCrLf)
Text2.Text = Mid$(vlines(1), 25)
End Sub
The above code reads line 1 of information of multiline Text1.Text and then places it in Text2.Text and it takes the text from the 25th character of that line forward.
BUT.....how do I start at the 25th character and stop at the 30th?
Can someone please modify the above code to show me an example of how to do it?
Thanks