#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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"


--
Vikxcel
------------------------------------------------------------------------
Vikxcel's Profile: http://www.excelforum.com/member.php...o&userid=18607
View this thread: http://www.excelforum.com/showthread...hreadid=498000

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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
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 Stuart[_20_] Excel Programming 1 February 17th 05 01:50 AM
VBE COM Add-in Shell R Avery Excel Programming 1 August 12th 04 02:55 PM
xp shell command using vba Sudhendra Excel Programming 2 February 16th 04 05:56 AM
Shell Joseph[_12_] Excel Programming 1 February 1st 04 04:33 AM
shell out of excel into another app toothfish__[_2_] Excel Programming 0 January 19th 04 03:02 PM


All times are GMT +1. The time now is 01:44 AM.

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

About Us

"It's about Microsoft Excel"