// 问题所在,没有切换路径
ChDir ThisWorkbook.Path
// 同步调用
Dim oShell As Object, ret As String
Set oShell = CreateObject("WSCript.shell")
ret = oShell.Run("test.exe " & " test.ini", 0, True)
'ret = oShell.Run(ThisWorkbook.Path & "\test.bat" & " test.ini rettest")
Set oShell = Nothing
[vba]shell执行exe或者bat没有反应
最新推荐文章于 2024-05-08 18:51:41 发布