Error: Vbscript "invalid Procedure Call Or Argument: 'mid'
Why does version 10 SR3 give this error with the VBscript below:
Value = Mid(Value, InStr(Value,"|"))
Value = Replace(Value, "|","")
The script works fine in old versions and version 10 but it show "Script Error"
Value = Mid(Value, InStr(Value,"|"))
Value = Replace(Value, "|","")
The script works fine in old versions and version 10 but it show "Script Error"
0
-
Hello,
Could you also attach your BT document (.btw) to this topic?0 -
The script works fine for me in v10 SR3.
With a data source of: Sample|Text
And I place the VB script in the OnProcessData event under the data source's "Transforms" tab, then I get an end result value of: Text
Where is your VB script located?0 -
[quote name='Ian C - Seagull Support' timestamp='1358347621' post='4090']
The script works fine for me in v10 SR3.
With a data source of: Sample|Text
And I place the VB script in the OnProcessData event under the data source's "Transforms" tab, then I get an end result value of: Text
Where is your VB script located?
[/quote]
Its located OnProcessData under the Transform tab. The script works when i print but when the label is open it shows "<script Error>"0 -
I guess the default value of the object when in design mode is not compatible with your script. Either give the object a default value which won't cause the script to error or surround the script with the following If..Then statement:
[code]
If Format.IsPrinting Or Format.IsPrintPreview Then
...
End If
[/code]0 -
[quote name='Ian C - Seagull Support' timestamp='1359047012' post='4193']
I guess the default value of the object when in design mode is not compatible with your script. Either give the object a default value which won't cause the script to error or surround the script with the following If..Then statement:
[code]
If Format.IsPrinting Or Format.IsPrintPreview Then
...
End If
[/code]
[/quote]
Worked.0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
5 Kommentare