Formating Dollar values

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
skiko
Newbie
Posts: 8
Joined: Sun Dec 16, 2007 8:40 pm
Location: USA
Contact:

Formating Dollar values

Post by skiko » Sun Dec 16, 2007 8:49 pm

I am trying to format a cost and retail dollar amount to 4 and 2 decimal places, this should be easy but my visual basic script blanks my two variable out and I get nothing. Any suggestions????

Code: Select all

Let>retail=1.4
Let>cost=0.99
VBEval>FormatNumber(%retail%,2),retail
VBEval>FormatNumber(%cost%,4),cost
MDL>Cost = %cost% %CRLF%Retail = %retail%

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Sun Dec 16, 2007 10:22 pm

You need these lines at the top of your script:

VBSTART
VBEND

A VBScript block is needed for the vbscript functions to work, even if it is empty.

skiko
Newbie
Posts: 8
Joined: Sun Dec 16, 2007 8:40 pm
Location: USA
Contact:

THANKS!! Thats what happens when I over think things

Post by skiko » Sun Dec 16, 2007 11:43 pm

THANKS!! Thats what happens when I over think things

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