473,406 Members | 2,894 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

IsNumeric..??

Dear All;

Thanx for helpt with previous question. Still learning??
FROM A VB 6.0 BOOK:

any way;

I have used IsNumeric function and check all namespace conflicts and all
and nothing seems to solve the error.

In my last question: I was writing;
msgbox "Please .....
WHEN I FOUND OUT THAT I SHOULD
MessageBox.Show("....
WHICH WORKED. THANX

Any similiar little thing that could be wrong with the way I'm writing
now:
Const curPrice As Integer = 50.5
Dim intQuantity As Integer

If IsNumeric(txtQuantity.Text) Then
intQuantity = Val(txtQuantity.Text)
lblDue.Text = curPrice * intQuantity
Else
MessageBox.Show("Non-numeric Data Entered", "IsNumeric",
MessageBoxButtons.OK, MessageBoxIcon.Asterisk)
End If

ERROR: "IsNumeric is a namespace" BUT I HAVE CHECKED FOR ALL
CONFLICTIONS USING THE OBJECT BROWSER.

Thanx in advance.

Radith

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #1
3 1949
I did not understand the question clearly. IsNumeric is in the Microsoft.VisualBasic namespace, if that is what you wanted to know.

"Radith Silva" wrote:
Dear All;

Thanx for helpt with previous question. Still learning??
FROM A VB 6.0 BOOK:

any way;

I have used IsNumeric function and check all namespace conflicts and all
and nothing seems to solve the error.

In my last question: I was writing;
msgbox "Please .....
WHEN I FOUND OUT THAT I SHOULD
MessageBox.Show("....
WHICH WORKED. THANX

Any similiar little thing that could be wrong with the way I'm writing
now:
Const curPrice As Integer = 50.5
Dim intQuantity As Integer

If IsNumeric(txtQuantity.Text) Then
intQuantity = Val(txtQuantity.Text)
lblDue.Text = curPrice * intQuantity
Else
MessageBox.Show("Non-numeric Data Entered", "IsNumeric",
MessageBoxButtons.OK, MessageBoxIcon.Asterisk)
End If

ERROR: "IsNumeric is a namespace" BUT I HAVE CHECKED FOR ALL
CONFLICTIONS USING THE OBJECT BROWSER.

Thanx in advance.

Radith

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 20 '05 #2
Radith Silva schrieb:
Thanx for helpt with previous question. Still learning??
FROM A VB 6.0 BOOK:
Notice that VB6 <> VB.NET.
I have used IsNumeric function and check all namespace conflicts and all
and nothing seems to solve the error.

In my last question: I was writing;
msgbox "Please .....
WHEN I FOUND OUT THAT I SHOULD
MessageBox.Show("....
WHICH WORKED. THANX
That didn't actually solve the problem, it's just a replacement.
Any similiar little thing that could be wrong with the way I'm writing
now:
Const curPrice As Integer = 50.5
Dim intQuantity As Integer

If IsNumeric(txtQuantity.Text) Then
intQuantity = Val(txtQuantity.Text)
lblDue.Text = curPrice * intQuantity
Else
MessageBox.Show("Non-numeric Data Entered", "IsNumeric",
MessageBoxButtons.OK, MessageBoxIcon.Asterisk)
End If

ERROR: "IsNumeric is a namespace" BUT I HAVE CHECKED FOR ALL
CONFLICTIONS USING THE OBJECT BROWSER.


Mhm... Does that occur in a simple "one form" project (blank project)
too? Do you use VS 2002 or 2003?

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #3
Hi Radith,

Are you using VS net?

If so, I would in that case try to make a new project and try this code
again.

If not
Set in your VBC parameters the right reference to the Microsoft.VisualBasic
namespace.

However tell if you are using the VS or VB.net IDE?

Cor
Nov 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: eje | last post by:
IsNumeric(value) should return false if value "can not be successfully converted to a Double." Instead I get the following error message: "Input string was not in a correct format." I use the...
4
by: Eugene Anthony | last post by:
I have received the following feedback for the two functions bellow: "The ISNUMERIC test is WORTHLESS for checking for an INT value, because ISNUMERIC will happily accept DOUBLE values, such as...
14
by: Kenny | last post by:
Hello, I would like to know if the function IsNumeric requires a header like #include <iostream> to be functionnal thanks ken
8
by: John Bowman | last post by:
Hello, Does anyone have a good/reliable approach to implementing an IsNumeric() method that accepts a string that may represent a numerical value (eg. such as some text retrieved from an XML...
3
by: martin | last post by:
Hi, is there a dotnet function (other than the old isnumeric from VB) to check whether an object is numeric or not. also I notice that all the old vb functions such as split / isnumeric /...
7
by: Nathan Truhan | last post by:
All, I think I may have uncovered a bug in the IsNumeric function, or at least a misunderstanding on functionality. I am writing a Schedule Of Classes Application for our campus and have a...
8
by: moondaddy | last post by:
What's the .net framework equivalent of the vb function isnumeric? If there isn't one, how can I test a string variable to see if its a number or not? I don't want to use isnumeric if possible ...
12
by: sck10 | last post by:
Hello, I am trying to determine if a value is NOT numeric in C#. How do you test for "Not IsNumeric"? protected void fvFunding_ItemInserting_Validate(object sender, FormViewInsertEventArgs...
12
by: Paul | last post by:
Hi, I am trying to check a string to see if it's first 3 characters are numeric and if they are, to replace those 3 characters with something else. I've tried this but nothing happens... ...
17
by: MLH | last post by:
I have tested the following in immed window: ?isnumeric(1) True ?isnumeric(1.) True ?isnumeric(1.2) True ?isnumeric(1.2.2)
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.