atoi ()

I'm looking for a function in vb (access 97) that will do the equivolent
of what the atoi() function does in c / c++

Please help!!!
LVL 3
packratt_jkAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

wyllikerCommented:
Use the CInt() function.

For example:

Dim A As Integer
Dim SSN As String

SSN = "177475884"

A = CInt("1234")

B = CInt(SSN)
0
packratt_jkAuthor Commented:
sorry - also need the reverse

itoa()
0
Erick37Commented:
Use CStr() or Str() to convert numbers to strings.

From VB Help:
"The Str function recognizes only the period (.) as a valid decimal separator. When different decimal separators may be used (for example, in international applications), use CStr to convert a number to a string."

You may also use Val() and Format()
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

packratt_jkAuthor Commented:
hmmm....

first of all, I only need to convert one character.
I need the ansi / ascii equviolent of the character to be returned
example: the character '2' should translate to 50 (decimal)
0
wyllikerCommented:
WOW, talk about changing your question as you go along ...


Use the Chr() function to return the character for a given integer.

Use the Asc() function to return a integer for a given character.

Chr(65) returns 'A'
Asc('A') returns 65
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
packratt_jkAuthor Commented:
Perfect!!!

sorry I asked the wrong question...
I knew what I meant :)

Thanks
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.