Hi,
This is a nice work which saved lot of time for me.
I've copied code from your previous threads to convert number to words.
In excel it worked well as you described, but when I copied the same thing to access as a VB module and gave reference of calculated field in my report, it started giving error.
Can you suggest what is going wrong in access.
Secondly if you can suggest a tweak where I can hide that "No Cents" when there is no decimal in figure.
I've to convert this thing to French numbers. If you can help me in this then it will be easier for me just to translate in French.
I am attaching screenshot alongwith for better understanding.
Sorry, Access is not my strong point so I'm not sure what to suggest to make it work for you.
Regards
Phil
Hi Saiprasad,
If you're using the code from this page, then it should work, the only change you need is to remove Application.Trim, as that is an excel specific function.
NumToWords = Application.Trim(Units & SubUnits) should be: NumToWords = Units & SubUnits
If you don't want to display "and No Cents", replace:
Case ""
SubUnits = " and No " & SubUnitName
with:
Case ""
SubUnits = ""