Set wsh = VBA.CreateObject("WScript.Shell") 'wsh.Run strExePath & " g", vbHide, True Set wshOut = wsh.exec(strExePath & " g").StdOut While Not wshOut.AtEndOfStream sLine = wshOut.ReadLine Debug.Print sLine Wend
run可以隐藏窗体
exec可以获取dos打印输出值
貌似没有即能隐藏窗体又能获取打印结果的办法。