If d2 < 2 Then
If d1 <> 0 Then
If d2 = 0 And d3 = 0 Then
transmall = a(d1) & " HUNDRED "
Else
transmall = a(d1) & "HUNDRED AND " & a(d2 * 10 + d3)
End If
Else
transmall = a(d2 * 10 + d3)
End If
Else
If d1 <> 0 Then
transmall = a(d1) & " HUNDRED AND " & a(d2 * 10) & " " & a(d3)
Else
transmall = a(d2 * 10) & " " & a(d3)
End If
End If
End Function
Function transbig(x As Double) As String
'/////maximun 999,999,999.99
Dim part1, part2 As Long, sect1, sect2, sect3 As Integer, a As Double
'/////a 是临时变量
'/////part1 是x的小数点前的整数部分
'/////sect1 是 999,999,999的前三位, sect2......
part1 = x \ 1
If part1 > x Then part1 = part1 - 1
a = x - part1
part2 = (a * 100) \ 1
If sect1 <> 0 Then
If sect2 <> 0 Then
If sect3 <> 0 Then
transbig = transmall((sect1)) & " MILLION AND " & transmall((sect2)) & " THOUSAND AND " & transmall((sect3))
Else
transbig = transmall((sect1)) & " MILLION AND " & transmall((sect2)) & " THOUSAND"
End If
Else
If sect3 <> 0 Then
transbig = transmall((sect1)) & " MILLION AND " & transmall((sect3))
Else
transbig = transmall((sect1)) & " MILLION"
End If
End If
Else
If sect2 <> 0 Then
If sect3 <> 0 Then
transbig = transmall((sect2)) & " THOUSAND AND " & transmall((sect3))
Else
transbig = transmall((sect2)) & " THOUSAND"
End If
Else
If sect3 <> 0 Then
transbig = transmall((sect3))
Else
transbig = ""
End If
End If
End If
End Function