From: ozgrid.com on 13 May 2010 23:18 Private Sub TextBox1_Exit _ (ByVal Cancel As MSForms.ReturnBoolean) If IsNumeric(TextBox1) Then If TextBox1.Value < 0 Then TextBox1 = 0 End If End If End Sub -- Regards Dave Hawley www.ozgrid.com "Gabe" <Gabe(a)discussions.microsoft.com> wrote in message news:0FA5E95F-1BDB-4F0A-B606-4E0D1B7DB7DA(a)microsoft.com... >I went in and formatted a cell to: 0;"0";0 so that all negative numbers >will > be converted to zero. I have a textbox on a userform that I need to do the > same thing. What code would I use? I tried this but it doesn't work: > > txtRemain.Value = Format(txtRemain.Value, "#,#00;""0""") > > Any help would be greatly appriciated. > > Thanks, > ~Gabe > >
First
|
Prev
|
Pages: 1 2 Prev: Help to find and replace between sheets Next: missing Application.FileSearch excel 2007 |