Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Formating
Message
From
02/09/2002 00:12:04
Teddy Win
Bytel Information Technology
Jakarta, Indonesia
 
 
To
All
General information
Forum:
Visual Basic
Category:
Other
Title:
Formating
Miscellaneous
Thread ID:
00695872
Message ID:
00695872
Views:
61
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
Map
View

Click here to load this message in the networking platform