(请教各位高手)如何调用go.bat
Dim t
t = Shell( "g:\1\go.bat ", vbNormalFocus)
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
Call ShellExecute(Me.hwnd, "open ", "g:\1\go.bat ", vbNullString, vbNullString, vbNormalFocus)
我用上面两个代码都运行不了,请指点一下,最好给段代码
[解决办法]
Dim t As String
t= "cmd.exe /c " & "g:\1\go.bat "
t = Shell(t,vbNormalFocus)
[解决办法]
那么用CDDrive和CdDir改变当前目录看看