I'm required to create a report that prints a number in 'thousands', 'hundreds', 'tens', 'units'. For example $104 must be written as:
Thousands Hundreds Tens Units
Zero One Zero Four
I'm having a problem with leading zero(s) in this report. Any ideas how to script this function in the modules?
where you pass in the colunn ie (1000) or (100) ...and the value of the number $104
Public Function getWords(columnNo As Long, value As Long) As String
Select Case Right(CStr(value \ columnNo), 1)
Case 0
getWords = "zero"
Case 1
getWords = "one"
Case 2
getWords = "two"
Case 3
getWords = "three"
Case 4
getWords = "four"
Case 5
getWords = "five"
Case 6
getWords = "six"
Case 7
getWords = "seven"
Case 8
getWords = "eight"
Case 9
getWords = "nine"
End Select
End Function