I am having problems playing back an AS400 (.mac) Macro when my VBA Code calls the .mac file Using the "StartMacro" Function. The
AS400 (.mac) Macro (partially shown below), which includes a lot of "
wait" functions (
in bold Italics) runs very fast and does not seem to recognized the
waits during execution when using the "StartMacro" Function Within VBA Code. The same macro runs perfectly when manually, selected from the PC5250 macro menu (Screenshot) in iSeries Access for Windows Menu

Description =
[wait app]
[wait inp inh]
"20
[enter]
[wait inp inh]
wait 15 sec until FieldAttribute 0000 at (22,6)
wait 15 sec until cursor at (22,7)
[wait app]
[wait inp inh]
"7
[enter]
[wait inp inh]
wait 15 sec until FieldAttribute 0008 at (4,4)
wait 15 sec until cursor at (4,5)
[wait app]
[wait inp inh]
[tab field]
[tab field]
"1
[enter]
[wait inp inh]
wait 15 sec until FieldAttribute 0008 at (4,4)
[wait app]
[wait inp inh]
[pf3]
[wait inp inh]
wait 15 sec until FieldAttribute 0000 at (22,6)
[wait app]
[wait inp inh]
...The PCOMM VBA syntax I am using to execute "
StartMacro" is below
SessObj.autECLPS.StartMacro ('JE#356BSB0421')The macro runs very fast and throws the following error:
Runtime Error '440'
Emulator interface (ehllapi) error. reason 9
... and then the macro aborts about 3/4 of the way through execution.
Finally, might my problem be related to the VBA code is using PCOMM syntax and the AS400 Macro was created in .
mac format, rather that .
vbscript format.
Thanks in advance for your experts guidance
Al
ASKER
Has anyone else had this same experience, and resolved it with alternative solution?
Any help is appreciated.
Thanks
Al