choudhmh
02-10-2008, 10:27 AM
I have this format button, when you input a value into a textbox and press the button, the value entered on the text box shows up on the text display area within the form:
Private Sub Command2_Click()
Text2.Text = Format(Text2.Text, "000.00")
ConverDigitToLCD Mid(Text2.Text, 1, 1), Digit12
ConverDigitToLCD Mid(Text2.Text, 2, 1), Digit13
ConverDigitToLCD Mid(Text2.Text, 3, 1), Digit14
ConverDigitToLCD Mid(Text2.Text, 5, 1), Digit15
ConverDigitToLCD Mid(Text2.Text, 6, 1), Digit16
End Sub
at present when i enter say 50 in the textbox the display shown is 050.00. But what i nedd is when i enter 50 it should show up like this: 000.50.
Does anyone know how i should format the code in order to achive this.
Private Sub Command2_Click()
Text2.Text = Format(Text2.Text, "000.00")
ConverDigitToLCD Mid(Text2.Text, 1, 1), Digit12
ConverDigitToLCD Mid(Text2.Text, 2, 1), Digit13
ConverDigitToLCD Mid(Text2.Text, 3, 1), Digit14
ConverDigitToLCD Mid(Text2.Text, 5, 1), Digit15
ConverDigitToLCD Mid(Text2.Text, 6, 1), Digit16
End Sub
at present when i enter say 50 in the textbox the display shown is 050.00. But what i nedd is when i enter 50 it should show up like this: 000.50.
Does anyone know how i should format the code in order to achive this.