title: I'm having trouble with my binary to decimal converter
body: <p>When I put in a binary number it gives me more than one result in messagebox.show. </p>
  
  <pre><code>Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  
      Dim s As String
      Dim a, b, c As Long
      a = CLng(Val(TxtBoxInput.Text))
      s = TxtBoxInput.Text
      TxtBoxInput.Clear()
  
      For i = 1 To Len(s) Step 1
          b = CLng(Mid(s, i, 1))
          c = Len(s) - i
          b = CLng(Val(b) * (2 ^ c))
          TxtBoxInput.Text = CStr(MessageBox.Show(CStr(Val(TxtBoxInput.Text) + b)))
      Next i
  End Sub
  </code></pre>