View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
damorrison
 
Posts: n/a
Default error in userform

I have text boxes and labels that show values, using formulas such as
the code below for Label7:

Private Sub TextBox2_Change()
Label7.Caption = Application.Text(CDbl(TextBox1.Value - TextBox2.Value)
/ (TextBox3.Value - 1), "# ??/16")
End Sub

If I am in textbox2 and enter a value, it works fine, if I want to
change the value by pressing back space I get a error, because (I
assume, it becomes a zero error)

...is there a way to trap this error and still be able to stay in the
textbox?