Mar 18, 2008 #1 NerdTop72 Programmer Mar 14, 2005 117 US brain fart... How do I check to see if the text in a TXTBox is numeric? if txtbox1.text is numeric then ??? Thanks, Nerdtop72
brain fart... How do I check to see if the text in a TXTBox is numeric? if txtbox1.text is numeric then ??? Thanks, Nerdtop72
Mar 18, 2008 1 #2 Sorwen Technical User Nov 30, 2002 1,641 US One was is IsNumeric(). Someone once told me there is a slight problem with that, but it has always worked fine for me. -I hate Microsoft! -Forever and always forward. Upvote 0 Downvote
One was is IsNumeric(). Someone once told me there is a slight problem with that, but it has always worked fine for me. -I hate Microsoft! -Forever and always forward.
Mar 18, 2008 Thread starter #3 NerdTop72 Programmer Mar 14, 2005 117 US Thanks for the fast response!! Is there a problem because of whole numbers and decimals or something? I totally forgot about IsNumeric, the whole time I thought my problem was spelling Numeric wrong HaHa Thanks again! Upvote 0 Downvote
Thanks for the fast response!! Is there a problem because of whole numbers and decimals or something? I totally forgot about IsNumeric, the whole time I thought my problem was spelling Numeric wrong HaHa Thanks again!
Mar 18, 2008 #4 Sorwen Technical User Nov 30, 2002 1,641 US My memory is going so I had to look up my thread. We talked about it here: thread796-1418806 -I hate Microsoft! -Forever and always forward. Upvote 0 Downvote
My memory is going so I had to look up my thread. We talked about it here: thread796-1418806 -I hate Microsoft! -Forever and always forward.
Mar 18, 2008 #5 earthandfire Programmer Mar 14, 2005 2,924 GB If IsNumeric does cause you a problem, then you could think about using a simple RegEx. Hope this helps. Upvote 0 Downvote
If IsNumeric does cause you a problem, then you could think about using a simple RegEx. Hope this helps.
Mar 18, 2008 #6 earthandfire Programmer Mar 14, 2005 2,924 GB Sorry I forgot to add a sample RegEx: ^\d+\.?\d*$" [tt] ^ = start of string to match \d+ = any number 1 or more times \.? = optional . \d* = optional any number $ = end if string to match [/tt] Hope this helps. Upvote 0 Downvote
Sorry I forgot to add a sample RegEx: ^\d+\.?\d*$" [tt] ^ = start of string to match \d+ = any number 1 or more times \.? = optional . \d* = optional any number $ = end if string to match [/tt] Hope this helps.