Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cint("0") error 1

Status
Not open for further replies.

chris5g

Programmer
Aug 21, 2001
48
US
I am trying to convert string input to an integer using the cint() function. I am running into a problem when I try to convert the string "0" to get integer 0. Any solutions for this?

Thanks!
 
- What is the error / exception ?
- How do you use the CInt() function.. I mean how do you do the assignment to a viriable (?)
 
You may want to consider using


Ctype("0",Integer)

it didn't blow up...

-The answer to your problem may not be the answer to your question.
 
I tried the Ctype("0",Integer) and it works with no errors - Thanks!

I am getting the same problem when I try to use the
IsNumeric("0") funtion. Well, I get False back, not a crash.

my program asks user for integers and I was using isnumeric to test and then cint() to change type. The only problem I ran into was when I input zero - "0". I have to use option strict turned on
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top