+ Reply to Thread
Results 1 to 2 of 2

Shell Command Differences Between Excel Versions

  1. #1
    Registered User
    Join Date
    10-02-2017
    Location
    Huntsville, Alabama
    MS-Off Ver
    2010
    Posts
    57

    Shell Command Differences Between Excel Versions

    I'm calling a custom written executable using the shell command from a Windows 7 machine, and a laptop running Windows XP. Common denominator was to save the spreadsheet as an Excel 97 workbook.

    The executable (correctly) reads a text file containing custom scripting, and sends commands out a USB port thru GPIB translator module (Prologix), and after equipment is set up, my executable writes out a text file consisting of data the Prologix module gathered by scripted read commands.

    That works.

    On the Windows 7 machine my executable outputs the file to the same directory as the executable.
    On the Windows XP machine it outputs the file to the same path reported by VBA using the command "? application.defaultfilepath" in the immediate window.

    I can "patch" this in excel, but it is best to change the executable to force a known path. Problem is, I'm wondering if the executable is "fooled" into thinking it is elsewhere by the shell() command setting up a DOS environment for it in one version of excel that is different in another version?!

    Anybody come across a solution or know what (undocumented?) mechanics rest behind the shell() command? It just seems easier to ask than to try and write a test snippet in C to "start guessing" at environment variables, etc.

    TIA
    Grug

    Please Login or Register  to view this content.

  2. #2
    Registered User
    Join Date
    10-02-2017
    Location
    Huntsville, Alabama
    MS-Off Ver
    2010
    Posts
    57

    Re: Shell Command Differences Between Excel Versions

    OK, enthusiastic silence...

    How about this, I got the process ID, is there a way to get the path from that (maybe thru the win API)?

    I did get a comspec window to stay open and the path that the laptop used isn't part of the path or saved via. set (environmental variables).

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Insert Excel cell range in Shell command
    By akalehzan in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-12-2016, 04:38 PM
  2. [SOLVED] Excel Reference for Shell Command
    By specialk9203 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-18-2015, 11:47 AM
  3. How wary should I be of differences to VBA between excel versions?
    By Darth269 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-26-2014, 08:33 PM
  4. How to Submit a JCL thru EXCEL SHELL COmmand
    By whatif in forum Access Programming / VBA / Macros
    Replies: 1
    Last Post: 12-22-2011, 09:12 AM
  5. shell command Excel 2007
    By arijit32 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-06-2010, 01:25 AM
  6. Help: Excel and Shell Command
    By josh@shift4.com in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-24-2006, 08:25 PM
  7. [SOLVED] relative path in shell command (excel)
    By SpeeD in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-16-2005, 01:52 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1