Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.newusers
|
|||
|
|||
Need help on Shell in Excel
Full program as-is below. Excel 2010.
Shell refuses to work (PC not MAC), always get error "File not found" no matter how i mangle that line. Naturally, there is NO "help" as this is M$ we are talking about. Sub TestDIR() ' Macro recorded 04/12/2018 by ROBERT BAER ' destPath = "G:\ANALOG" DaTm = Date$ + " " + Time$ Open pPath + "Log.TXT" For Append As #1 ' error "File not found" any variant of Shell. pState = Shell("DIR *.* LOOK.DIR", vbNormalFocus) 'QB3 FORMAT is SHELL "DIR *.BMP LOOK.DIR" Stop Print #1, DaTm + " to " + vNam Close End Sub Help? Thanks. |
#2
|
|||
|
|||
Try this
Run the script either as:
bash script.sh or just: ./script.sh When bash is run using the name sh, it disables most of its extensions, such as the [[ testing operator. Since you have the #!/bin/bash shebang line, you don't need to specify the shell interpreter explicitly on the command line. Running the script as a command will use that line to find the shell. Let me know if this was helpful. Regards, Jerry |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Shell to another program from Excel | Excel Programming | |||
Is it possible to Shell and remove Excel from memory? | Excel Discussion (Misc queries) | |||
Help: Excel and Shell Command | Excel Programming | |||
Return to Excel after shell an application | Excel Programming | |||
shell out of excel into another app | Excel Programming |