Format string

L

Luis

Hello.
I'm using VBA to build a Word document from a Access table.
I need to format a strng but i didn't found out how yet.

The original string is for example 999999€ and the result i'd like is
999.999€.

If the string is 1000000€ the goal is to format it to 1.000.000€

Can anyone give me a hint?

Thanks

Luis
 
P

Paolo

Hi luis,

Format(yourstring,"Currency")
in this way if your string is 1000000 the result is € 1.000.000

if yourstring is 999999€
Format(left(yourstring,len(yourstring)-1),"#.### €")

HTH Paolo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top