954,515 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Input Validation

Hello!

I'm trying to find out how to validate input from a textbox, I want to make sure it is an integer within a certain range and that the destination variable is big enough for it. Sorry if this is stupid question, I just can't find anything and it's starting to annoy me!


Thank!

tb808kid
Newbie Poster
12 posts since Dec 2007
Reputation Points: 10
Solved Threads: 0
 

Hi,

If IsNumeric(Me.txtInput.Text) And Me.txtInput.Text > 10 And Me.txtInput.Text < 100 Then

            'you action

        End If
kb.net
Junior Poster
172 posts since Aug 2007
Reputation Points: 13
Solved Threads: 29
 

Thanks very much KB, I knew it would something like that, I just don't have any decent recources on VB. This worked flawlessly for my project.

tb808kid
Newbie Poster
12 posts since Dec 2007
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You