This isn't really an answer but I wanted to be able to format the code ...
Your code you posted - with my comments...
Txtsolution.Text = Math.Sin(Txtsolution.Text)
variable1 = Val(txtsolution.Text)
Txtsolution.Text = ""
operation = "+"
variable2 = Val(Txtsolution.Text)
If operation = "+" Then
resultat = variable1 + variable2
Txtsolution.Text = resultat
End If
This makes no sense to me - I thought you were asking about a bracket? I see no bracket in your code, and the code just doesn't make sense to me (not to mention that some of your code is a function and the rest is just, sort of, there.
Have you just copied and pasted random code or is this actually a part of your program?