日期:2014-05-17 浏览次数:20785 次
public Function NumToText(dblVal As Double, CurrencyCode As String) As String
Static Ones(0 To 9) As String
Static Teens(0 To 9) As String
Static Tens(0 To 9) As String
Static Thousands(0 To 4) As String
Static bInit As Boolean
Dim i As Integer, bAllZeros As Boolean, bShowThousands As Boolean
Dim strVal As String, strBuff As String, strTemp As String
Dim nCol As Integer, nChar As Integer
Dim CurrencyUnit As String, CurrencyCents As String
'Only handles positive values
if dblVal < 0 then
exit function
end if
If bInit = False Then
'Initialize array
bInit = True
Ones(0) = "zero "
Ones(1) = "one "
Ones(2) = "two "