Wie kann ich eine .bat-Datei (batch-Datei) über ein Excel Makro starten? Mit "Shell" funktionieren ja nur ausführbare Programme (.exe-Dateien)? Hat wer damit Erfahrung?
Mit "Shell" funktionieren ja nur ausführbare Programme (.exe-Dateien)?
wer behauptet das?
Private Declare Function ShellExecute _
Lib "shell32.dll" Alias "ShellExecuteA" ( _
ByVal hWnd As Long, _
ByVal Operation As String, _
ByVal Filename As String, _
Optional ByVal Parameters As String, _
Optional ByVal Directory As String, _
Optional ByVal WindowStyle As Long = vbMinimizedFocus _
) As Long
Sub Start()
ShellExecute 0, "Open", "c:\test.bat", , , 1
End Sub
Gruß Tino