Technical support and scripting issues
Moderators: Dorian (MJT support), JRL
-
skiko
- Newbie
- Posts: 8
- Joined: Sun Dec 16, 2007 8:40 pm
- Location: USA
-
Contact:
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%
-
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:
Post
by skiko » Sun Dec 16, 2007 11:43 pm
THANKS!! Thats what happens when I over think things