HELP!! How to prevent Input of Alphabets in the code below >>>
Thanks Guys Problem Solved For That Part
---------------------------------------------------------
POST EDITED BY HanneSThEGreaT to reflect original question
---------------------------------------------------------
Do
StudentDetails(X).English = InputBox("Please Enter English Marks")
If StudentDetails(X).English < 0 Or StudentDetails(X).English > 100 Then
MessageBox.Show("Invalid input!""Please enter a value not More then 100 or Less then 0!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
End If
Loop While (StudentDetails(X).English < 0 Or StudentDetails(X).English > 100)
-------------------------------------------------------------
Re: HELP!! How to prevent Input of Alphabets in the code below >>>
Easy. Convert it to a list of numbers, and have them pick one. Kind of like a cell phone does
Re: HELP!! How to prevent Input of Alphabets in the code below >>>
Assign the value of the InputBox to a string. Check the string to see if it IsNumeric.
Re: HELP!! How to prevent Input of Alphabets in the code below >>>
and positive, and not HEX #F4, and not a fraction, and ...
Drop down is better, with ALL the choices
Re: HELP!! How to prevent Input of Alphabets in the code below >>>
Quote:
Originally Posted by
Rush1991
Do
StudentDetails(X).English = InputBox("Please Enter English Marks")
If StudentDetails(X).English < 0 Or StudentDetails(X).English > 100 Then
MessageBox.Show("Invalid input!""Please enter a value not More then 100 or Less then 0!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
End If
Loop While (StudentDetails(X).English < 0 Or StudentDetails(X).English > 100)
Rsuh, please don't just slpa code together and post it here, without any sort of explanation - hence the confusion. I can suggest use AND instead of OR
Quote:
Originally Posted by
Mur16
Assign the value of the InputBox to a string. Check the string to see if it IsNumeric.
Yes :thumb:
Quote:
Originally Posted by
dglienna
and positive, and not HEX #F4, and not a fraction, and ...
Drop down is better, with ALL the choices
David, what are you smoking? You cannot be serious. :eek:
Re: HELP!! How to prevent Input of Alphabets in the code below >>>
[I]Sorry Guys. I Have Done Thanks..
Re: HELP!! How to prevent Input of Alphabets in the code below >>>
Rush. Some more forum ethics here :
First, use the Report post feature only to report spam or insulting posts. That is all that will get removed.
Second, You have edited your first post in this thread, rendering this thread entirey completely and wholely useless.
This is a forum, where questions are asked and questions are answered. That is the whole definition of the word forum. Now, people having the same problem as you will never ever find their answers because of your selfishness. I will Go back, and edit your first post to reflect the original question again.
Please don't do it again, and please only use the report post feature to report spam
Hannes
Re: HELP!! How to prevent Input of Alphabets in the code below >>>
sorry im new here i did not know
Re: HELP!! How to prevent Input of Alphabets in the code below >>>
No problem. Now you do know :)
Re: HELP!! How to prevent Input of Alphabets in the code below >>>
Hannes, &H100 is a Number. Why do you think cellphones don't have you type time or date fields out by hand?