LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default DOS..BAT VB Progamming problem

Whoops, I forgot to show the resulting command, whic is as follows:

varProc = Shell("cmd /c FileName")


"TomD" wrote:

HI guys,

Thanks for the help.

I have found a partial solution to my problem as shown below:

varProc = Shell("cmd /c c:\Program.exe arg1 arg2 c:\InputData.txt")

But, the problem is that the Executable will not always be in a Root
Directory, as different people will put it in different places. It is,
however, explicitively implied that it be in the same directory as the
WorkBook.

Therefore I tried this method and it fails:

FileName = ActiveWorkbook.Path & "\Program.exe arg1 arg2 c:\InputData.txt"

Thanks in advance for any help that you can give me,
Tom



"TomD" wrote:

I have a program that prints to the screen. From a DOS window, or with a BAT
file I can redirect the data to a file via the following command "Path Arg1
Arg2 Filename. But, when I execute the BAT file from a VB program, using
either Shell or FollowHyperlink, the output file is created or recreated but
remains empty. Any help will be greatly appreciated.

TomD



 
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
Colon at the end of excel file name(ex: problem.xls:1, problem.xls financeguy New Users to Excel 2 January 15th 10 01:15 AM
Started out as an Access problem. Now an Excel problem RobertM Excel Discussion (Misc queries) 2 April 26th 06 07:30 PM
Lookup/Progamming Help! HeatherO Excel Programming 0 February 6th 05 05:41 PM
Problem when multipple users access shared xl-file at the same time, macrocode for solve this problem? OCI Excel Programming 0 May 16th 04 10:40 PM


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

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

About Us

"It's about Microsoft Excel"