View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default DOS..BAT VB Progamming problem

This is only a guess, but try adding a call to the Command Processor in your
Shell statement, something like this...

Shell Environ("COMSPEC") & " c:\Path\To\BatFile\NameOfBatFile.bat"

Note the space in front of the path string.

--
Rick (MVP - Excel)


"TomD" wrote in message
...
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