Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Batch file in Shell Function

I am trying to get a batch file to run in the background
of excel that transfers text files via ftp up and down
from an AS400 server. I can get excel to call the batch
file with the code Shell "C:\schedule\down.bat, 1",
however, the batch file never completes its task and excel
gives no error. I can run the batch file by going to the
folder where it is stored and manually double clicking on
the file. It runs in a DOS window and works fine when
executed that way. Am I missing something in excel that
allows the batch file to run in a DOS window or something?
Can anyone help me with this problem?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 170
Default Batch file in Shell Function


"Eric" wrote in message
...
I am trying to get a batch file to run in the background
of excel that transfers text files via ftp up and down
from an AS400 server. I can get excel to call the batch
file with the code Shell "C:\schedule\down.bat, 1",
however, the batch file never completes its task and excel
gives no error. I can run the batch file by going to the
folder where it is stored and manually double clicking on
the file. It runs in a DOS window and works fine when
executed that way. Am I missing something in excel that
allows the batch file to run in a DOS window or something?
Can anyone help me with this problem?


If you have VB, C++ or the Developer edition of office
you can use the msinet.ocx in your VBA code
to do the ftp avoiding the batch file altogether

see
http://officerone.tripod.com/vba/ftp_upload_file.html

Keith


  #3   Report Post  
Posted to microsoft.public.excel.programming
jaf jaf is offline
external usenet poster
 
Posts: 300
Default Batch file in Shell Function

Hi Eric,
Try Shell "C:\schedule\down.bat", 1 instead.


--

John

johnf202 at hotmail dot com


"Eric" wrote in message
...
I am trying to get a batch file to run in the background
of excel that transfers text files via ftp up and down
from an AS400 server. I can get excel to call the batch
file with the code Shell "C:\schedule\down.bat, 1",
however, the batch file never completes its task and excel
gives no error. I can run the batch file by going to the
folder where it is stored and manually double clicking on
the file. It runs in a DOS window and works fine when
executed that way. Am I missing something in excel that
allows the batch file to run in a DOS window or something?
Can anyone help me with this problem?



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
run batch job from each row - how to insert run batch function per row? Mitchell_Collen via OfficeKB.com Excel Discussion (Misc queries) 5 February 26th 09 07:16 AM
Shell function II [email protected] Excel Programming 1 September 19th 03 05:55 PM
Shell function II Don Guillett[_4_] Excel Programming 1 September 19th 03 03:31 PM
Shell function David Excel Programming 0 September 19th 03 11:30 AM
Copying a file with VBA (or with a SHELL command) Franck V. Excel Programming 1 September 15th 03 07:46 PM


All times are GMT +1. The time now is 09:49 PM.

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"