D
DS
I have this code that seemed to have worked and then stopped. If you
type in 1 you are suppose to get .01 in the TxtHidden field.
type in 11 it should be .11
type in 111 it should be 1.11
instead I'm getting ...
type in 1 I get 1.00
type in 11 I get 11.00
type in 111 I get 111.00
Any help appreciated.
Thanks
DS
'1 Button
Private Sub Image1_Click()
Me.LabelRate.Visible = False
Me.LabelDisplay.Visible = True
Me.TxtHidden = Me.TxtHidden & 1
Dim strX As String
Select Case Len(Trim(TxtHidden.Value))
Case 0
strX = "0"
Case 1
strX = ".0" & TxtHidden.Value
Case 2
strX = "." & TxtHidden.Value
Case Else
strX = Left(TxtHidden.Value, Len(Trim(TxtHidden.Value)) -
2) & "." & Right(TxtHidden.Value, 2)
End Select
Me.LabelDisplay.Caption = Format(strX, "$0.00")
End Sub
type in 1 you are suppose to get .01 in the TxtHidden field.
type in 11 it should be .11
type in 111 it should be 1.11
instead I'm getting ...
type in 1 I get 1.00
type in 11 I get 11.00
type in 111 I get 111.00
Any help appreciated.
Thanks
DS
'1 Button
Private Sub Image1_Click()
Me.LabelRate.Visible = False
Me.LabelDisplay.Visible = True
Me.TxtHidden = Me.TxtHidden & 1
Dim strX As String
Select Case Len(Trim(TxtHidden.Value))
Case 0
strX = "0"
Case 1
strX = ".0" & TxtHidden.Value
Case 2
strX = "." & TxtHidden.Value
Case Else
strX = Left(TxtHidden.Value, Len(Trim(TxtHidden.Value)) -
2) & "." & Right(TxtHidden.Value, 2)
End Select
Me.LabelDisplay.Caption = Format(strX, "$0.00")
End Sub