VBEVAL>formatnumber don't work

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
alecuba16
Newbie
Posts: 1
Joined: Fri Dec 22, 2006 6:42 am

VBEVAL>formatnumber don't work

Post by alecuba16 » Fri Dec 22, 2006 6:52 am

Hi,

I'm trying to format a number from a variable divisions, and i can't.

I'm trying now with a independent script only for test how to format the number but it doesn't works too:

Code: Select all

let>original=1/5
let>lookfor=,
let>reemplacement=.
StringReplace>%original%,%lookfor%,%reemplacement%,result
VBEval>FormatNumber(%result%,2),finalresult
message>finalresult
But the VBEval don't returns any characters, only return empty finalresult variable.

I'm using StringReplace, because my computer(spanish windows) remplaces the "." of decimals with "," by default.

And uses the "." for separating thousands values like 1.000 .

Anyway i tried the formatnumber with no stringremplace, and don't work.

Code: Select all

let>original=1/5
VBEval>FormatNumber(%original%,2),finalresult
message>finalresult
I installed windows scripting host 5.6 and no results.

Do you know what's the problem?

Thanks.

PD: Sorry my bad english.

User avatar
pgriffin
Automation Wizard
Posts: 460
Joined: Wed Apr 06, 2005 5:56 pm
Location: US and Europe

Post by pgriffin » Fri Dec 22, 2006 3:56 pm

Could you please give two examples of

1. Original String (with format)

2. Final String (with format)


so 123.456,09

converted to 123,456.09

then we can help.

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts