Page 202 - Ms Excel 2010
P. 202
Chương 8. Phím tắt va ̀ Thủ thuật
Result = Result & ConvertDigit(Mid(MyNumber, 3))
End If
ConvertHundreds = Trim(Result)
End Function
Private Function ConvertTens(ByVal MyTens)
Dim Result As String
' Is value between 10 and 19?
If Val(Left(MyTens, 1)) = 1
Then Select Case Val(MyTens)
Case 10: Result = "Muoi"
Case 11: Result = "Muoi mot"
Case 12: Result = "Muoi hai"
Case 13: Result = "Muoi ba"
Case 14: Result = "Muoi bon"
Case 15: Result = "Muoi lam"
Case 16: Result = "Moi sau"
Case 17: Result = "Muoi bay"
Case 18: Result = "Muoi tam"
Case 19: Result = "Muoi chin"
Case Else
End Select
Else
' .. otherwise it’s between 20 and 99.
Select Case Val(Left(MyTens, 1))
Case 2: Result = "Hai muoi "
Case 3: Result = "Ba muoi "
Case 4: Result = "Bon muoi "
Trang 202
Tải miễn phí tại: Webtietkiem.com