Hi
An alternative. Not a trivial question despite what you may think - it gets very difficult very soon. Here is a stand alone example (with NO error checking), which tries to handle a simple + or - function with 2 numbers only. It is quite messy, but then that is part of the difficulty for this type of coding (can be tidied up though)
If you want to try this, start a new test project, add TextBox1, TextBox2 and Button1 to Form1 then copy/replace all Form1 default code with this code.
' Form1 with TextBox1 and TextBox2
' and Button1
Option Strict On
Option Explicit On
Public Class Form1
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim s As String = TextBox1.Text
Dim p1 As Integer = part(Trim(s))
s = s.Remove(0, p1.ToString.Length)
Dim op As String = s(0)
s = s.Substring(1, s.Length - 1)
Dim p2 As Integer = part(Trim(s))
Select Case op
Case "+"
TextBox2.Text = (p1 + p2).ToString
Case "-"
TextBox2.Text = (p1 - p2).ToString
End Select
End Sub
Function part(s As String) As Integer
Dim v As Integer = 0
Dim x As Integer = 0
For i As Integer = 1 To s.Length
Dim s2 As String = s.Substring(0, i)
Integer.TryParse(s2, v)
If v = 0 Then Exit For
x = v
Next
Return x
End Function
End Class