Hello, i want convert amount in text to amount in numbers in vb6. please help me

Recommended Answers

All 5 Replies

first of all thnx to reply. I m not talking about Val()
My requirement is as follow

e.g. one hundred fifty - text
150 - number
this type of text to number

there is no direct function to do the same in Vb . Try writing your own function for the purpose.

I do have a function that does the opposite but haven't even attempted to go in the other direction :) I'll give it a shot though, and post any results that aren't too embarassing.

OK I have it now. It isn't exactly bullet-proof, but it works great and will at least get you started.

Now, remember, I wrote this in an hour so don't be too critical :P

Also you might have problems with the References since I am using the enterprise edition of Visual Basic and I don't recall changing it's default project's references. if so you can probably simply ignore them. I don't know what your project is that needs this but good luck!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.