Hallo Holger,
ich glaube da hilft Dir dies weiter:

Problems with Playing a PC5250 Visual Basic Macro
Incident Summary

Problem Summary:
When playing a Visual Basic macro in PC5250, it terminates before the end of the script.

Resolution:
The IBM OS/400 command being called in the macro contained a double quotation mark ( " ) before the end of the script. Because a Visual Basic macro automatically places a double quotation mark ( " ) at the beginning and ending of the command, it was interpreting the double quotation mark ( " ) in the middle of the command as the end of script and terminating it. Record the macro as a Macro File rather than a VBScript file, or remove the parameter in the OS/400 command that contains the double quotation mark ( " ).