|
-
Nov 19th, 2009, 08:33 AM
#1
Thread Starter
Junior Member
how to convert string into integer
does anyone know how to convert string into integer?
-
Nov 19th, 2009, 08:38 AM
#2
Re: how to convert string into integer
It really depends on the string:
say if you have string "123abc" it could be as simple as Val("123abc") wich will produce 123;
however string "abc123" will result in zero (using Val function) - in this case you 'll need parse it and elliminate all non-numeric chars mfirst'
There is CInt(), CLng() function that may convert numeric strings to Integer/Long...
... however, that is just a tip of an iceberg ...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|