LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 989
Default checking for a numeric value in a textbox

Hi.

I have a couple of textboxes on a vb form. For these, I need the value
entered to be sure to be numeric.

What's the best way to check for that?

application.isnumber(txtBox.value) returns false... becauese it thinks its
text.

the Val(txtBox.value) function does some checking, but it will tell you that
Val(5a) = 5, etc.

I think one time I did some checking on the len of Val(), as compared to the
original len of the entry, but that probably has holes too.

Please point me toward the simple way.

Thanks.

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Checking range of cells for entry then checking for total Barb Reinhardt Excel Programming 1 October 13th 06 02:47 PM
Format Numeric data in Textbox stickandrock Excel Worksheet Functions 1 October 25th 05 01:44 AM
checking input on a textbox in userform to be a % Jean-Pierre D via OfficeKB.com Excel Programming 11 August 25th 05 11:39 PM
Ensuring UserForm Textbox Entry is numeric [email protected] Excel Programming 3 October 8th 04 11:20 PM
Use numeric data from a textbox on an userform Excel[_3_] Excel Programming 0 July 23rd 03 04:45 PM


All times are GMT +1. The time now is 06:19 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"