Insert 0.00 instead of 0,00 as numberformat

Insert 0.00 instead of 0,00 as numberformat

stefanveurink68AXD
Advocate Advocate
880 Views
3 Replies
Message 1 of 4

Insert 0.00 instead of 0,00 as numberformat

stefanveurink68AXD
Advocate
Advocate

Like title says: 
if have format FM = 0.00

However, when inserting text with ThisDrawing.ModelSpace.AddText((Number  FM), Ep, T18) it still gives me: 0,00 
instead of the wanted 0.00. 

 

Most be a culture problem, but seems like I can't set this with Vba? I don't want use text replace (cause also possible to insert 1,234.56 instead of 1234.56

 

Is this solvable?

 

Thanks!

0 Likes
881 Views
3 Replies
Replies (3)
Message 2 of 4

Ed__Jobe
Mentor
Mentor

Is the Number function you show one that you created?

You might try using the VBA FormatNumber function. In the VBAIDE, go to Help and look up the function. It has a GroupDigits argument that allows you to turn off the use of the regional settings.

FormatNumber (FM, 2, vbFalse, vbFalse, vbFalse)

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

Message 3 of 4

stefanveurink68AXD
Advocate
Advocate

to come back on this, I tried it but still isn't working. And yes, I see the groupdigits in the objectbrowser. Negative number are changed when I do this, but doesn't matter if i use VbFalse or VbTrue, it always still puts in a comma (,) instead of a dot (.). with all 3 vbFalse and with all 3 with VbTrue. 

 

0 Likes
Message 4 of 4

Ed__Jobe
Mentor
Mentor

In your first post, you mentioned "FM = 0.00". What type of object is FM? How is it stored?

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

0 Likes