第2个回答 2012-12-11
'api申明
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, _
ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, _
ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
shell "执行路径",vbhide
不显示执行窗口一定是你需要的吧。
如果需要执行文件自动打开一个文件,当然这个执行文件可以打开这类文件,比如一个播放器可以播放视频的,那么代码如下:
Shell " 执行文件路径 " & " " & "执行文件打开的文件路径", vbNormalFocus本回答被网友采纳