Function SpellCurr
Function SpellCurr
'*****************************************************************************
************************************
'* Based on SpellNumbers UDF by Microsoft, Which handles only Dollars as
currency *
'* UDF modfied by Yogesh Gupta, [email protected], Ygblogs.blogspot.com on
July 21, 2009 *
'* UDF modified on September 04, 2009 to make currency inputs optional, by
default it will use Indian Currency *
'* This modified UDF can be used for any currency in case you provide for
currency inputs *
'* User can define the Prefix and Sufix place for Currency and
CurrencyDecimals *
'* MyNumber = Numeric Value you need to convert into words
*
'* MyCurrency = Name of your Currency - i.e. Dollar for USA
*
'* MyCurrencyPlace = Prefix or Suffix the currency, use "P" for Prefix and "S"
for Suffix *
'* MyCurrencyDecimals = Name of your Currency Decimals - i.e. Cent for USA
*
'* MyCurrencyDecimalsPlace = Prefix or Suffix the currency decimals, use "P"
for Prefix and "S" for Suffix *
'*****************************************************************************
************************************
Count = 1
Loop
End Function
'*******************************************
' Converts a number from 100-999 into text *
'*******************************************
'*********************************************
' Converts a number from 10 to 99 into text. *
'*********************************************
Function GetTens(TensText)
'*******************************************
' Converts a number from 1 to 9 into text. *
'*******************************************
Function GetDigit(Digit)
Select Case Val(Digit)
Case 1: GetDigit = "One"
Case 2: GetDigit = "Two"
Case 3: GetDigit = "Three"
Case 4: GetDigit = "Four"
Case 5: GetDigit = "Five"
Case 6: GetDigit = "Six"
Case 7: GetDigit = "Seven"
Case 8: GetDigit = "Eight"
Case 9: GetDigit = "Nine"
Case Else: GetDigit = ""
End Select
End Function