Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.visual.basic    |    MS Visual Basic discussions, NOT dot-net    |    10,840 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 9,962 of 10,840    |
|    Dean Earley to All    |
|    Re: visual basic input validation intege    |
|    14 Mar 06 10:25:40    |
      XPost: comp.programming       From: dean.earley@icode.co.uk              > It seems to me that a simple cast and cast back can be used for validation:       >       > Function MyIsNumeric(ByVal cand as String) as Boolean       > If cand = CStr(CLng(cand)) Then       > MyIsNumeric = True       > Else       > MyIsNumeric = False       > End Function       >       > But take that with a grain of salt, I haven't actually tested it.              You may want to use Val() rather than CLng() as the latter will error       when its not a number.              --       Dean Earley (dean.earley@icode.co.uk)       i-Catcher Development Team              iCode Systems              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca