use same VB script for several text input boxes
I have 50 input boxes where data is scanned and need to extract serial number. What can I do to not have to change all 50 for changes?
edit: current way is to have the same script in all of their transform tab. Every change is really time consuming.
I thought about Functions and Subs (just do everything in function and all it in OnProcessData for the input boxes) but it seems I can't just have a Function available for all (when entering the Function under the input box then it's available for only that box's OnProcessData, and if I entered it under View>VB Scripting>Functions and Subs then it couldn't be used either).
What other options do i have?
-
Is the any consistency about the data you need to extract? Such as always characters 8 through 12 or last 6, all start with 123... etc?
0 -
Hi Peter,
Yes, the data is all in the same format.
Allthough the format can change in the future and changing the transform for 50 input boxes would be a real pain.
0 -
Have you tried making the label fields VB Script fields, probably Event Controlled and OnPostPrompt and then call the Function at that time?
0 -
But how do I reduce work that way? I can't find a way to call a common Function. When I add a function to Functions and Subs (either document level or other lable field) and call it I get Type mismatch error.
What am I missing? I can read all the values from another object so can do that easily but can't write them.
0
Please sign in to leave a comment.
Comments
4 comments