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!


Recommended Answers

All 2 Replies


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

            'you action

        End If

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.