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
Declare Function GetForegroundWindow Lib "user32" () As Long
Sub ShellEx(FileName As String)
ShellExecute GetForegroundWindow, "Open", FileName, "", "", 1
End Sub
Sub TestShellExecute()
ShellExecute GetForegroundWindow, "Open", "c:\bootlog.txt", "", "", 1
End Sub