Shell & VBA

V

Vikxcel

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"
 
D

Dave Peterson

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???
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top