Check if textbox is a Valid Integer from 0 to 10000.
How can I check if a textbox contains a number that is a valid integer (just numbers) and that its a number from 0 to 10000 The way i did was in loops which would freeze the program for a few seconds. Any other ways
Check if textbox is a Valid Integer from 0 to 10000.
Microfix
No, tryparse is a static method
dim tst as int16
if int.tryparse(text1.text, out tst) then
end if
http://windowssdk.msdn.microsoft.com/library/default.asp url=/library/en-us/cpref6/html/M_System_Int32_TryParse_1_0b81a80f.asp
Mikelynes
first use int.tryparse to see if it's a number. Then check if that int is in the range you want.
Or, use a masked text box to specify the input range you require
G. English
dim tst as int16
tst.tryparse(text1.text, what here )
Guy le Mar
dim ggg as integer
if integer.tryparse(files.text,ggg) = false then
'Invalid Integer
end if
AndreBa
Jessie968
int is a type. It's visible from everywhere. As in, dim i as int.