+ Reply to Thread
Results 1 to 2 of 2

Shell & VBA

  1. #1
    Registered User
    Join Date
    01-18-2005
    Posts
    24

    Shell & VBA

    Ok, this question may be simple, but it's not clicking with me...
    So in my vba code for excel I execute a number of .bat files using SHELL command. Now, I needed to find a DOS program or command that would do something special for me, so I found a xchange.exe on the web that does EXACTLY what i'm looking for. So I set it into my Program Files\my program directory, where my batch file is sitting at.
    In my batch I run that file on a number of text files.
    When manually I execute this batch file, it works fine.
    But in VBA Shell it does not run.
    Question, do I need to place or load that special exchange.exe into something???
    This is what i have in my batch file, or cmd file.
    XCHANGE combined.txt "^39^44^39" "^39^124^39"

  2. #2
    Dave Peterson
    Guest

    Re: Shell & VBA

    Maybe the simplest solution would be to add a couple of lines to the top of your
    ..bat file:

    c:
    cd\programdirectory
    XCHANGE combined.txt "^39^44^39" "^39^124^39"

    ===
    change to the correct drive (C
    change to the correct folder
    run the command.

    combined.txt will end up in that same folder, right???

    ----

    Untested!

    Vikxcel wrote:
    >
    > Ok, this question may be simple, but it's not clicking with me...
    > So in my vba code for excel I execute a number of .bat files using
    > SHELL command. Now, I needed to find a DOS program or command that
    > would do something special for me, so I found a xchange.exe on the web
    > that does EXACTLY what i'm looking for. So I set it into my Program
    > Files\my program directory, where my batch file is sitting at.
    > In my batch I run that file on a number of text files.
    > When manually I execute this batch file, it works fine.
    > But in VBA Shell it does not run.
    > Question, do I need to place or load that special exchange.exe into
    > something???
    > This is what i have in my batch file, or cmd file.
    > XCHANGE combined.txt "^39^44^39" "^39^124^39"
    >
    > --
    > Vikxcel
    > ------------------------------------------------------------------------
    > Vikxcel's Profile: http://www.excelforum.com/member.php...o&userid=18607
    > View this thread: http://www.excelforum.com/showthread...hreadid=498000


    --

    Dave Peterson

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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