-
I want an input field for a amount and I want it to look something like #0.00. The problem is that the program will be used with diffrent regional settings. That means that sometime it will be a decimal "," and sometimes a decimail ".".
I have treid to use a textbox but is that the smartest way to get it to display "5.60" or "5,60" depending to the settings then the user enters "5.6" or "5,6". I also want to convert it to a Long by multiply it with 100.
-
Auto-formatting currency boxes have always been a pain in the ass. You could try the masked edit box control that's shipped with VB - or you could buy an add-on component from http://www.componentsource.com - search there for controls. Most of them have free eval copies so you can find a good one. I know Apex do one (www.apexsc.com) but they bundle it along with many other data-aware controls and it's quite expensive.
-
Try using the Format function:
Code:
Text1 = Format$(Text1, "0.00")
Good luck!
-
Thanks Joacim, I got the format OK :) !
My next question is how to get out 1.35 from both "1.35" and "1,35", is there a VB function or do I have to do it by my self ?
[Edited by AKA on 08-24-2000 at 01:09 AM]