Select Case Val(TensText) Case 10: Result = "Ten" Case 11: Result = "Eleven" Case 12: Result = "Twelve" Case 13: Result = "Thirteen" Case 14: Result = "Fourteen" Case 15: Result = "Fifteen" Case 16: Result = "Sixteen" Case 17: Result = "Seventeen" Case 18: Result = "Eighteen" Case 19: Result = "Nineteen" Case Else End Select Else ' If value between 20-99. If Val(Left(TensText, 1)) = 1 Then ' If value between 10-19. Function GetTens(TensText) Dim Result As String Result = "" ' Null out the temporary function value. ' Converts a number from 10 to 99 into text. If Mid(MyNumber, 2, 1) "0" Then Result = Result & GetTens(Mid(MyNumber, 2)) Else Result = Result & GetDigit(Mid(MyNumber, 3)) End If GetHundreds = Result End Function If Mid(MyNumber, 1, 1) "0" Then Result = GetDigit(Mid(MyNumber, 1, 1)) & " Hundred " End If ' Convert the tens and ones place. ' Converts a number from 100-999 into text Function GetHundreds(ByVal MyNumber) Dim Result As String If Val(MyNumber) = 0 Then Exit Function MyNumber = Right("000" & MyNumber, 3) ' Convert the hundreds place. If DecimalPlace > 0 Then Paise = GetTens(Left(Mid(MyNumber, DecimalPlace + 1) & _ "00", 2)) MyNumber = Trim(Left(MyNumber, DecimalPlace - 1)) End If Count = 1 Do While MyNumber "" Temp = GetHundreds(Right(MyNumber, 3)) If Temp "" Then Rupees = Temp & Place(Count) & Rupees If Len(MyNumber) > 3 Then MyNumber = Left(MyNumber, Len(MyNumber) - 3) Else MyNumber = "" End If Count = Count + 1 Loop Select Case Rupees Case "" Rupees = "No Rupees" Case "One" Rupees = "One Rupee" Case Else Rupees = Rupees & " Rupees" End Select Select Case Paise Case "" Paise = " and No Paise" Case "One" Paise = " and One Paisa" Case Else Paise = " and " & Paise & " Paise" End Select SpellNumber = Rupees & Paise End Function DecimalPlace = InStr(MyNumber, ".") ' Convert Paise and set MyNumber to Rupee amount. MyNumber = Trim(Str(MyNumber)) ' Position of decimal place 0 if none. Option Explicit 'Main Function Function SpellNumber(ByVal MyNumber) Dim Rupees, Paise, Temp Dim DecimalPlace, Count ReDim Place(9) As String Place(2) = " Thousand " Place(3) = " Million " Place(4) = " Billion " Place(5) = " Trillion " ' String representation of amount.