i am using a custom textbox control which doesn’t have Text.Split() function in this box i enter a string in the follwing format : “35 To 99” , now here is my code i know its wrong, my programming skills are limited
Dim v1 As Int32
Dim v2 As Int32
Dim rule As New String("{0} To {1}", v1, v2) = TextBox1.Text
MsgBox(v1 & " " & v2)
in other words how would you get the nubers in this string “35 To 99” assign each one to a variable without Text.Split()
Splitis a method of theStringclass, not theTextBoxclass. As such, it doesn’t matter where you get the string from, whether it be from a text box, a custom control, a file, or anywhere else, you can use theString.Splitmethod to split it. For instance:Or, more tersely:
To make the split case insensitive, just force the case one way or the other on the whole string before you split it, for instance:
or