Hi All
I am designing a user form whereby it would calculate the total cost after performing rate * quantity
However I have encounter difficulties whereby the vba is able to calculate the total cost but could not convert to currency.
Are there anyone who could advise me on where the code has gone worng?
Below is the code
Private Sub TxtAmount_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal x As Single, ByVal y As Single)
Me.TxtAmount.Value = Me.TxtBoxQuantity * Me.TxtBoxRate
Me.TxtAmount.Value = Format(Me.TxtAmount.Value, "Currency")
End Sub
I am designing a user form whereby it would calculate the total cost after performing rate * quantity
However I have encounter difficulties whereby the vba is able to calculate the total cost but could not convert to currency.
Are there anyone who could advise me on where the code has gone worng?
Below is the code
Private Sub TxtAmount_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal x As Single, ByVal y As Single)
Me.TxtAmount.Value = Me.TxtBoxQuantity * Me.TxtBoxRate
Me.TxtAmount.Value = Format(Me.TxtAmount.Value, "Currency")
End Sub