PASSPORT Knowledge Base
Macros

Date Published: November 25, 2003  
Date Updated: March 10, 2008

Title

Type Mismatch Error

Product

PASSPORT PC to Host, PASSPORT Web to Host

Emulation Types

TN3270, TN5250, VT, SCO ANSI, Wyse 60

Issue

When choosing the Macro®Run menu command and selecting a macro to run, I am getting the error: "An error occurred on line 2, position0, of the script. Error: Type mismatch: 'Shell'" (see below).   What should I do?

 

Solution

This error indicates that the command line parameter for the Shell command is invalid. Normally, it is a good idea to include the entire path for the command to run. For example, below is a macro to start Microsoft Excel:

 

Sub ZMain()

ret = Shell ("C:\Program Files\Microsoft Office\Office10\EXCEL.EXE", 3)

End Sub

More Information

Keywords

macro, shell, type mismatch, path, error