Forum

Convert Numbers (Cu...
 
Notifications
Clear all

Convert Numbers (Currency) to Words With Excel VBA

3 Posts
3 Users
0 Reactions
119 Views
(@ssparalkar)
Posts: 1
New Member
Topic starter
 

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.Screen-2.jpgscreen1.jpg

 
Posted : 16/03/2020 3:47 pm
Philip Treacy
(@philipt)
Posts: 1629
Member Admin
 

Sorry, Access is not my strong point so I'm not sure what to suggest to make it work for you.

Regards

Phil

 
Posted : 16/03/2020 6:42 pm
(@catalinb)
Posts: 1937
Member Admin
 

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 = ""

 
Posted : 17/03/2020 12:40 am
Share: