-
December 10th, 2012, 03:22 AM
#1
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)
-------------------------------------------------------------
Last edited by HanneSThEGreaT; December 11th, 2012 at 03:59 AM.
-
December 10th, 2012, 12:49 PM
#2
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
-
December 10th, 2012, 02:28 PM
#3
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.
-
December 10th, 2012, 11:25 PM
#4
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
-
December 11th, 2012, 03:02 AM
#5
Re: HELP!! How to prevent Input of Alphabets in the code below >>>
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
Originally Posted by Mur16
Assign the value of the InputBox to a string. Check the string to see if it IsNumeric.
Yes
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.
-
December 11th, 2012, 03:24 AM
#6
Re: HELP!! How to prevent Input of Alphabets in the code below >>>
[I]Sorry Guys. I Have Done Thanks..
Last edited by Rush1991; December 11th, 2012 at 04:04 AM.
-
December 11th, 2012, 03:58 AM
#7
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
-
December 11th, 2012, 04:02 AM
#8
Re: HELP!! How to prevent Input of Alphabets in the code below >>>
sorry im new here i did not know
-
December 11th, 2012, 04:07 AM
#9
Re: HELP!! How to prevent Input of Alphabets in the code below >>>
No problem. Now you do know
-
December 14th, 2012, 02:55 PM
#10
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?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|