DOTNETCoder33
Member
- Joined
- Jun 18, 2010
- Messages
- 15
- Programming Experience
- Beginner
all i need to know is how to stop the user from entering letters rather than numbers in this example:
Module Module1
Sub Main()
Dim test As Integer
Console.Write("Please enter a number: ")
test = Console.ReadLine
End Sub
End Module
i have heard i could use "ISNumeric" but i put it in a "Do Loop Until" but still didnt work:
Module Module1
Sub Main()
Dim test As Integer
Do
Console.Write("Please enter a number: ")
test = Console.ReadLine
Loop Until IsNumeric(test)
End Sub
End Module
just get a runtime error !! arghh!
how would i fix this? thanks, and vice-versa ... how would i get them to enter only text rather than numbers?
Module Module1
Sub Main()
Dim test As Integer
Console.Write("Please enter a number: ")
test = Console.ReadLine
End Sub
End Module
i have heard i could use "ISNumeric" but i put it in a "Do Loop Until" but still didnt work:
Module Module1
Sub Main()
Dim test As Integer
Do
Console.Write("Please enter a number: ")
test = Console.ReadLine
Loop Until IsNumeric(test)
End Sub
End Module
just get a runtime error !! arghh!
how would i fix this? thanks, and vice-versa ... how would i get them to enter only text rather than numbers?