通过VB调用Shell,启动应用程序IMSmachine.exe,
打开指定文件DMU.imsmdl如果直接用文件路径,一切可以正常运行。就是说用 ..\IMSverify2007.2.1\samples\DMU50\DMU.imsmdl 代替Shell语句中的 &strOpenFile& 是可以正常运行。想应用文件路径变量strOpenFile,就无法成功运行。运行结果是:
应用程序IMSmachine.exe可以打开,但提示找不到文件:
C:\Program Files\IMSpost73c\IMSmachine.exe &strOpenFile&Private Sub CmdRun_Click()    
    Dim strOpenFile As String
    strOpenFile = "..\IMSverify2007.2.1\samples\DMU50\DMU.imsmdl"
    Shell ("C:\Program Files\IMSpost73c\IMSmachine.exe &strOpenFile&")
End Sub谢谢!