LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Old April 13th 18, 03:36 AM posted to microsoft.public.excel.newusers
external usenet poster
First recorded activity by ExcelBanter: Dec 2007
Posts: 93
Default 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)
Print #1, DaTm + " to " + vNam

End Sub


  #2   Report Post  
Old December 28th 20, 08:58 AM
Junior Member
First recorded activity by ExcelBanter: Dec 2020
Posts: 26
Default Try this

Run the script either as:

or just:

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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Shell to another program from Excel Jimbo[_4_] Excel Programming 3 September 17th 06 03:23 PM
Is it possible to Shell and remove Excel from memory? alainB Excel Discussion (Misc queries) 3 August 2nd 06 04:16 PM
Help: Excel and Shell Command [email protected] Excel Programming 7 April 25th 06 01:22 AM
Return to Excel after shell an application abc[_6_] Excel Programming 1 September 12th 05 11:25 AM
shell out of excel into another app toothfish__[_2_] Excel Programming 0 January 19th 04 04:02 PM

All times are GMT +1. The time now is 02:56 AM.

Powered by vBulletin® Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
Copyright 2004-2021 ExcelBanter.
The comments are property of their posters.

About Us

"It's about Microsoft Excel"


Copyright © 2017