Public Class Form1
    Dim line As String
    Dim n As Integer
    Dim var() As Double
    Dim sum As Double

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        TextBox1.Text = ""
        TextBox2.Text = ""
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        line = TextBox1.Text
        If line.IndexOf("+") = -1 Then
            sum = Double.Parse(line)
        Else
            Do
                var(n) = Double.Parse(line.Substring(0, line.IndexOf("+")))
                line = line.Substring(line.IndexOf("+") + 1)
                n += 1
            Loop Until line.IndexOf("+") = -1
            var(n) = Double.Parse(line)
            For i As Integer = 0 To n
                sum += var(i)
            Next i
        End If
        TextBox2.Text = sum
        sum = 0
    End Sub
End Class
