change the argument data type if you need to.
Function Words(Arg As Long) As String
For i = 1 To Len(CStr(Arg))
Select Case CInt(Mid(Arg, i, 1))
Case 1: Words = Words & "One "
Case 2: Words = Words & "Two "
Case 3: Words = Words & "Three "
Case 4: Words = Words & "Four "
Case 5: Words = Words & "Five "
Case 6: Words = Words & "Six "
Case 7: Words = Words & "Seven "
Case 8: Words = Words & "Eight "
Case 9: Words = Words & "Nine "
Case 0: Words = Words & "Zero "
End Select
Next i
Words = Trim(Words)
End Function
"JCP" wrote:
Hi
I need a funtion to convert Number to words literally, I mean 1241 (One Two
four one)
I found many examples for currency but I need literal every number to word.
Thanks in advance.
|