If Text1.Text <> Val(Text1.Text) Then scl = 1 'if it's not a number , it's 1 ElseIf Text1.Text = Val(Text1.Text) Then scl = Val(Text1.Text) 'if it's a number , even 0 End If