Option Explicit 'Main Function Function NumToWord(ByVal UserNumber) Dim Dollars, Cents, Temp Dim DPlaceNum, Count ReDim Place(9) As String Place(2) = " Thousand " Place(3) = " Million " Place(4) = " Billion " Place(5) = " Trillion " UserNumber = Trim(Str(UserNumber)) DPlaceNum = InStr(UserNumber, ".") If DPlaceNum > 0 Then Cents = ForTens(Left(Mid(UserNumber, DPlaceNum + 1) & _ "00", 2)) UserNumber = Trim(Left(UserNumber, DPlaceNum - 1)) End If Count = 1 Do While UserNumber <> "" Temp = ForHundreds(Right(UserNumber, 3)) If Temp <> "" Then Dollars = Temp & Place(Count) & Dollars If Len(UserNumber) > 3 Then UserNumber = Left(UserNumber, Len(UserNumber) - 3) Else UserNumber = "" End If Count = Count + 1 Loop Select Case Dollars Case "" Dollars = "No Dollars" Case "One" Dollars = "One Dollar" Case Else Dollars = Dollars & " Dollars" End Select Select Case Cents Case "" Cents = " and No Cents" Case "One" Cents = " and One Cent" Case Else Cents = " and " & Cents & " Cents" End Select NumToWord = Dollars & Cents End Function Function ForHundreds(ByVal UserNumber) Dim Result As String If Val(UserNumber) = 0 Then Exit Function UserNumber = Right("000" & UserNumber, 3) ' Convert the hundreds place. If Mid(UserNumber, 1, 1) <> "0" Then Result = GDigit(Mid(UserNumber, 1, 1)) & " Hundred " End If ' Convert the tens and ones place. If Mid(UserNumber, 2, 1) <> "0" Then Result = Result & ForTens(Mid(UserNumber, 2)) Else Result = Result & GDigit(Mid(UserNumber, 3)) End If ForHundreds = Result End Function Function ForTens(TensText) Dim Result As String Result = "" ' Null out the temporary function value. If Val(Left(TensText, 1)) = 1 Then ' If value between 10-19... 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... Select Case Val(Left(TensText, 1)) Case 2: Result = "Twenty " Case 3: Result = "Thirty " Case 4: Result = "Forty " Case 5: Result = "Fifty " Case 6: Result = "Sixty " Case 7: Result = "Seventy " Case 8: Result = "Eighty " Case 9: Result = "Ninety " Case Else End Select Result = Result & GDigit _ (Right(TensText, 1)) ' Retrieve ones place. End If ForTens = Result End Function Function GDigit(Digit) Select Case Val(Digit) Case 1: GDigit = "One" Case 2: GDigit = "Two" Case 3: GDigit = "Three" Case 4: GDigit = "Four" Case 5: GDigit = "Five" Case 6: GDigit = "Six" Case 7: GDigit = "Seven" Case 8: GDigit = "Eight" Case 9: GDigit = "Nine" Case Else: GDigit = "" End Select End Function If your currency is Rupees, then Copy and Paste the Following code in the new Module1 windows: Function NumToWords(ByVal UserNum, _ Optional UserCurr As String = "Rupee", _ Optional UserCurrP As String = "P", _ Optional UserCurrD As String = "Paisa", _ Optional UserCurrDP As String = "S") Dim Rupees, Paisa, Temp Dim DecimalPlace, Count ReDim Place(9) As String Place(2) = " Thousand " Place(3) = " Million " Place(4) = " Billion " Place(5) = " Trillion " UserNum = Trim(Str(UserNum)) DecimalPlace = InStr(UserNum, ".") If DecimalPlace > 0 Then Paisa = ForTens(Left(Mid(UserNum, DecimalPlace + 1) & _ "00", 2)) UserNum = Trim(Left(UserNum, DecimalPlace - 1)) End If Count = 1 Do While UserNum <> "" Temp = ForHundreds(Right(UserNum, 3)) If Temp <> "" Then Rupees = Temp & Place(Count) & Rupees If Len(UserNum) > 3 Then UserNum = Left(UserNum, Len(UserNum) - 3) Else UserNum = "" End If Count = Count + 1 Loop If UserCurrP = "P" Then Select Case Rupees Case "" Rupees = UserCurr & "s" & " Zero" Case "One" Rupees = UserCurr & " One" Case Else Rupees = UserCurr & "s " & Rupees End Select Else Select Case Rupees Case "" Rupees = "Zero " & UserCurr & "s" Case "One" Rupees = "One " & UserCurr Case Else Rupees = Rupees & " " & UserCurr & "s" End Select End If If UserCurrDP = "S" Then Select Case Paisa Case "" Paisa = " Only" Case "One" Paisa = " and One " & UserCurrD & " Only" Case Else Paisa = " and " & Paisa & " " & UserCurrD & "s Only" End Select Else Select Case Paisa Case "" Paisa = " Only" Case "One" Paisa = " and " & UserCurrD & " One " & " Only" Case Else Paisa = " and " & UserCurrD & "s " & Paisa & " Only" End Select End If NumToWords = Rupees & Paisa End Function Function ForHundreds(ByVal UserNum) Dim Result As String If Val(UserNum) = 0 Then Exit Function UserNum = Right("000" & UserNum, 3) If Mid(UserNum, 1, 1) <> "0" Then Result = ChkDig(Mid(UserNum, 1, 1)) & " Hundred " End If If Mid(UserNum, 2, 1) <> "0" Then Result = Result & ForTens(Mid(UserNum, 2)) Else Result = Result & ChkDig(Mid(UserNum, 3)) End If ForHundreds = Result End Function Function ForTens(TensText) Dim Result As String Result = "" If Val(Left(TensText, 1)) = 1 Then 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 Select Case Val(Left(TensText, 1)) Case 2: Result = "Twenty " Case 3: Result = "Thirty " Case 4: Result = "Forty " Case 5: Result = "Fifty " Case 6: Result = "Sixty " Case 7: Result = "Seventy " Case 8: Result = "Eighty " Case 9: Result = "Ninety " Case Else End Select Result = Result & ChkDig _ (Right(TensText, 1)) End If ForTens = Result End Function Function ChkDig(Digit) Select Case Val(Digit) Case 1: ChkDig = "One" Case 2: ChkDig = "Two" Case 3: ChkDig = "Three" Case 4: ChkDig = "Four" Case 5: ChkDig = "Five" Case 6: ChkDig = "Six" Case 7: ChkDig = "Seven" Case 8: ChkDig = "Eight" Case 9: ChkDig = "Nine" Case Else: ChkDig = "" End Select End Function