Jump to content

HELP

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
2 replies to this topic

#1
dionne

dionne

    Newbie

  • Members
  • Pip
  • 9 posts
What is the code for a text box that doesn't accept negative numbers?
Please.

#2
chili5

chili5

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 7,248 posts
Um,

I don't really want to just give you the code, but you can use:


If TextBox1.Text < 0 Then

TextBox1.Text = ""

Else

'What to do if the text box value isn't negative

End If



#3
Xav

Xav

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 13,118 posts
You need some validation there chili, to ensure Text is a number. IsNumeric() should do.
Jordan said:

Good members, like yourself, stick around and post for ages to come!
Mr. Xav | Blog | Forums