I am very new to VB6..I meet problem with my simple codes as follow:
Private Sub cmdTest_Click()
Dim mTotal as Double
Dim mVAT as Single
Dim mVATValue as Single
mTotal= 16,589.7138
mVAT=10
UpdateVAT mTotal, mVAT, mVATValue
' My problem goes here
Msgbox mVATValue ' Result = 1,658.97138 (This is the correct result)
' I want to display the result with to the text box with the following
format: ###,###,##0.0000
mDisplay = Format(mVATValue, "###,###,##0.0000")
But the result is: 1,658,9714 ==> the decimal digits was rounded automatically.. This is my problem .. I don't want to the result will NOT rounded automatically
End Sub
Private Sub UpdateVAT(ByVal pCurrentTotal As Double, ByVal pVAT As Single, ByRef pVATValue As Single)
Dim mVAT as Single
mVAT = pVAT / 100
pVATValue = mGTotal * mVAT
End Sub
Any suggestion or idea .. is highly appreciated and thanks in advance
Regards
Teddy
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only