shell
https://learn.microsoft.com/en-us/office/vba/language/reference/user-interface-help/shell-function
' Specifying 1 as the second argument opens the application in ' normal size and gives it the focus. Dim RetVal RetVal = Shell("C:\WINDOWS\NOTEPAD.EXE", 1) ' Open Notepad.
Cheers, that's what I'm trying but can't get it to run a batch file
Sub Editbatch() Status = Shell("notepad c:\Users\aggi\Desktop\Createfolders.bat ", 1) End Sub
Opens notepad and loads the batch as expected.
But neither
runs the batch. Just get this error. It works fine if I double click it.
@aggi started
London Fixed Gear and Single-Speed is a community of predominantly fixed gear and single-speed cyclists in and around London, UK.
This site is supported almost exclusively by donations. Please consider donating a small amount regularly.
shell
https://learn.microsoft.com/en-us/office/vba/language/reference/user-interface-help/shell-function