944,150 Members | Top Members by Rank

Ad:
  • VB.NET Discussion Thread
  • Unsolved
  • Views: 954
  • VB.NET RSS
Jun 16th, 2007
0

exception error

Expand Post »
How do I handle an exception error if a user enters nothing or a letter into the input box when I have it declared as an integer.

--------------------------------------------------------------------------------
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
cwb01 is offline Offline
1 posts
since Jun 2007
Jun 17th, 2007
0

Re: exception error

Try...catch perhaps.
Featured Poster
Reputation Points: 1536
Solved Threads: 431
Posting Expert
iamthwee is offline Offline
5,865 posts
since Aug 2005
Jun 17th, 2007
0

Re: exception error

You say that

if input is <= 0 then
whatever error message.

Anything entered that is not an integer, when the data type is integer, it is considered less than (or in some cases equal to) 0 if I am not mistaken. This should also take care of it if a user enters nothing (which I'm pretty sure is considered as a value of 0).
Reputation Points: 437
Solved Threads: 1
Posting Virtuoso
sk8ndestroy14 is offline Offline
1,851 posts
since Mar 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in VB.NET Forum Timeline: Using Crystal reports in Winforms in Vb.net
Next Thread in VB.NET Forum Timeline: Online Play in Games Possible?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC