:?: Variable check

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
User avatar
Xander
Newbie
Posts: 2
Joined: Tue May 17, 2005 10:58 am
Location: Holland
Contact:

:?: Variable check

Post by Xander » Fri Sep 09, 2005 1:50 pm

Dear users,

I have the following problem in mine newest macro-program. It's a program to close an work order from our ERP software. I have made a seperate window dialog where the user enters the workorder and the AMOUNT and then starts the closing down of the work order.

The problem is that I want to check the variable placed by the user as the AMOUNT. IOW:

Is is possible to check that a variable is an integer type? So that I'm sure that an amount is entered and not some string value.

(If I put don't enter a number in our ERP software it goes wacky and so does mine macro)

Thanks in advance...

Grtz Xander
------------------------------------------

Xander Holl

BG Nederland

Fieldarchery all the way - watch http://www.fieldarcher.nl

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Sat Sep 10, 2005 12:45 am

Divide by 1 and check for remainder or error.

Integer should result in neither.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

User avatar
Xander
Newbie
Posts: 2
Joined: Tue May 17, 2005 10:58 am
Location: Holland
Contact:

Post by Xander » Mon Sep 12, 2005 8:50 am

As most coputer problems, I was trying out the hard solutions and forgot the simple one..

Thankx Bob, it worked!
------------------------------------------

Xander Holl

BG Nederland

Fieldarchery all the way - watch http://www.fieldarcher.nl

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