Hi All.
I am wondering if it is possible to take a string, split it at a certain character and then put the 2 parts in different text boxes.
For example:
String: PCNAME%Message
Textbox1: PCNAME
Textbox2: Message
thanks in advanced.
Printable View
Hi All.
I am wondering if it is possible to take a string, split it at a certain character and then put the 2 parts in different text boxes.
For example:
String: PCNAME%Message
Textbox1: PCNAME
Textbox2: Message
thanks in advanced.
Code:Dim s As String = "PCNAME%Message"
Dim parts() As String
parts = s.Split("%"c)
Debug.WriteLine(parts(0))
Debug.WriteLine(parts(1))
Brilliant that worked a treat! Thanks!