代码如下
Dim commandLine As String
commandLine = "cmd /c dir"
Shell commandLine, vbNormalFocus
示例代码使用了 Shell()
函数,并传入要执行的命令字符串 "cmd /c dir"
。vbNormalFocus
参数指定了窗口的显示方式。
代码如下
Dim commandLine As String
commandLine = "cmd /c dir"
Shell commandLine, vbNormalFocus
示例代码使用了 Shell()
函数,并传入要执行的命令字符串 "cmd /c dir"
。vbNormalFocus
参数指定了窗口的显示方式。