Page 201 - Ms Excel 2010
P. 201
Chương 8. Phím tắt va ̀ Thủ thuật
End Select
' Clean up cents.
Select Case Cents
Case ""
Cents = " va khong
Dong" Case "One"
Cents = " va mot Dong"
Case Else
Cents = " va " & Cents & " Dong" End Select
ConvertCurrencyToVietnamese = Dollars & Cents
End Function
Private Function ConvertHundreds(ByVal MyNumber)
Dim Result As String
' Exit if there is nothing to convert.
' Append leading zeros to number.
MyNumber = Right("000" & MyNumber, 3)
' Do we have a hundreds place digit to
convert? If Left(MyNumber, 1) <> "0" Then
Result = ConvertDigit(Left(MyNumber, 1)) & " Tram
" End If
' Do we have a tens place digit to convert?
If Mid(MyNumber, 2, 1) <> "0" Then
Result = Result & ConvertTens(Mid(MyNumber, 2))
Else
' If not, then convert the ones place digit.
Trang 201
Tải miễn phí tại: Webtietkiem.com