title: Error on textbox text change event VBA form
body: <p>I have a textbox named "txtEndBalance" in a form I want only numbers to be inserted as a part of data validation. Therefore I have On Error event.</p>
  
  <p>Now when I fire up the form via a button. It directly goes to the error and I have a message box pop up "Invalid currency amount". This wasn't supposed to be like this.</p>
  
  <p>And then when I get rid of the pop up trying to enter a number. And right when I enter a single digit number it throws that error again.</p>
  
  <p>I have no idea where I am wrong in the code below because I think I did everything right.</p>
  
  <p>Have look at the file <a href="https://www.dropbox.com/s/fukksjxqifsyn1w/4HO2389.xlsm?dl=0" rel="nofollow">here</a> if you need.</p>
  
  <pre><code>Private Sub txtEndBalance_Change()
  
      On Error GoTo Error:
  
      Dim amt As Currency
      amt = txtEndBalance
      txtEndBalance = Format(amt, "$##,###,##0")
      Exit Sub
  
  Error:
          If txtEndBalance &lt;&gt; "$" And txtEndBalance &lt;&gt; "" Then
          MsgBox "Invalid currency amount", , "Error"
          txtEndBalance = Format(0, "$##,###,##0")
          End If
  
  End Sub
  </code></pre>