Hello everyone,
I am new to this forum, and to programing for that matter. I am a student and taking a very basic intro class in VB 2005.
I am working on a project that requires a prompt from the user for input <i.e input box> The problem I am having is with trying to validate the inout box after it has failed a Numeric check... The code looks like this
If IsNumeric(txtWi nd.Text) = False Or Val(txtWind.Tex t) < 0 Or Val(txtWind.Tex t) > 25 Then
MsgBox("Please Enter Positive numbers only!")
Else
When I try and place it in a loop one of 2 things happen. 1) I get tossed into an infintie loop. 2) The program populates the MsgBox and moves on to the next segment of code.
What I am trying to accomplish is when the IsNumeric check is true it repopulates another InputBox until a Valid input is placed.
Thanks in Advance
Soft
I am new to this forum, and to programing for that matter. I am a student and taking a very basic intro class in VB 2005.
I am working on a project that requires a prompt from the user for input <i.e input box> The problem I am having is with trying to validate the inout box after it has failed a Numeric check... The code looks like this
If IsNumeric(txtWi nd.Text) = False Or Val(txtWind.Tex t) < 0 Or Val(txtWind.Tex t) > 25 Then
MsgBox("Please Enter Positive numbers only!")
Else
When I try and place it in a loop one of 2 things happen. 1) I get tossed into an infintie loop. 2) The program populates the MsgBox and moves on to the next segment of code.
What I am trying to accomplish is when the IsNumeric check is true it repopulates another InputBox until a Valid input is placed.
Thanks in Advance
Soft
Comment