IsNumeric..??

R

Radith Silva

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
 
G

Guest

I did not understand the question clearly. IsNumeric is in the Microsoft.VisualBasic namespace, if that is what you wanted to know.
 
H

Herfried K. Wagner [MVP]

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

Notice that VB6 said:
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?
 
C

Cor Ligthert

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

How to Line Break 10

Top