MaskedBox

Travis26
09-15-2000, 03:10 PM
I am using a MaskedBox in vb and would like to know if there is a floating symbol to use. I am declaring a dollar value (9 declares an optional value $9,999.99) but sometimes the number is only 2 or 3 (ex $3.33) and leaves $0,003.33 as the value displayed. Anybody have any information ?

Valkyrie
09-15-2000, 03:31 PM
Try this...

"$###,##0.00"

The zero is a place holder that will always show a value and the # is a placeholder that will only show significant values.

Cheers.

Quote of the moment....
"My job is so top secret even I don't know what I'm doing!"

Travis26
09-15-2000, 03:44 PM
Actually I have tried this and the problem is I am performing a calculation based on the value that gets entered. So when i use $#,##0.00 and only enter $#304.33 the calculation tries to multiply $#304.33 by my value. I need to set it up so the # (symbol) does not exist

Valkyrie
09-15-2000, 04:07 PM
IF you are doing calc's on the value then you will need to convert the MaskEdBox to an integer since it is currently a string. Use the CInt function to do this.

<font color=blue><pre>
Private Sub MaskEdBox1_Change()
Dim x As Integer
x = CInt(MaskEdBox1.Text)

End Sub

</font color=blue></pre>


HTH


Quote of the moment....
"My job is so top secret even I don't know what I'm doing!"

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum