Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Numbers
Hello,
I am trying to figure out a way to prevent users from entering a "not real" number into a text box. I tried to ues an If statement.... If Not Isnumeric...... This doesn't seem to work. I had a user input "2345.45-" with no error but excel igneroed the number in a calculation. My users are bound to make many mistakes and I would like to catch them at the time. Thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Numbers
Try using Application.IsNumber()
Even better is to set a cell to the text box value and then test the value of the cell to see if the above is true. Why? Try 100%. If in a text box, it is not a number. But if written to a cell, it is a number. Bob Flanagan Macro Systems Delaware, U.S. 302-234-9857 http://www.add-ins.com Productivity add-ins and downloadable books on VB macros for Excel "Jevul" wrote in message ... Hello, I am trying to figure out a way to prevent users from entering a "not real" number into a text box. I tried to ues an If statement.... If Not Isnumeric...... This doesn't seem to work. I had a user input "2345.45-" with no error but excel igneroed the number in a calculation. My users are bound to make many mistakes and I would like to catch them at the time. Thanks |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Numbers
Bob,
Another great tip from this ng. I knew about Application.IsNumber, but your point about setting it to a cell is new to me. Now, if I can just find a corner of my brain to stuff it in... Thanks, Doug Glancy "Bob Flanagan" wrote in message ... Try using Application.IsNumber() Even better is to set a cell to the text box value and then test the value of the cell to see if the above is true. Why? Try 100%. If in a text box, it is not a number. But if written to a cell, it is a number. Bob Flanagan Macro Systems Delaware, U.S. 302-234-9857 http://www.add-ins.com Productivity add-ins and downloadable books on VB macros for Excel "Jevul" wrote in message ... Hello, I am trying to figure out a way to prevent users from entering a "not real" number into a text box. I tried to ues an If statement.... If Not Isnumeric...... This doesn't seem to work. I had a user input "2345.45-" with no error but excel igneroed the number in a calculation. My users are bound to make many mistakes and I would like to catch them at the time. Thanks |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Numbers
Thanks, works perfectly!
-----Original Message----- Try using Application.IsNumber() Even better is to set a cell to the text box value and then test the value of the cell to see if the above is true. Why? Try 100%. If in a text box, it is not a number. But if written to a cell, it is a number. Bob Flanagan Macro Systems Delaware, U.S. 302-234-9857 http://www.add-ins.com Productivity add-ins and downloadable books on VB macros for Excel "Jevul" wrote in message ... Hello, I am trying to figure out a way to prevent users from entering a "not real" number into a text box. I tried to ues an If statement.... If Not Isnumeric...... This doesn't seem to work. I had a user input "2345.45-" with no error but excel igneroed the number in a calculation. My users are bound to make many mistakes and I would like to catch them at the time. Thanks . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel change a group of positive numbers to negitive numbers | Excel Discussion (Misc queries) | |||
Excel 2002 : Convert Positive Numbers to Negative Numbers ? | Excel Discussion (Misc queries) | |||
Excel Formula - Add column of numbers but ignore negative numbers | Excel Worksheet Functions | |||
Help! How do you get excel to find the x(changes daily, marked in a cell from another formula) highest numbers in a group of numbers and sum them up? | Excel Worksheet Functions | |||
Help! How do you get excel to find the x(changes daily, marked in a cell from another formula) highest numbers in a group of numbers and sum them up? | Excel Worksheet Functions |