Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Executing an FTP call
When I execute "Commands.Bat" (see below for content) in the CMD window,
the file "Commands.Out" is created in "E:\Data - Mac\Mac's Documents\Application Data\". But when I execute it from the Shell Command in Excel with TS = Shell("Cmd /c Commands", vbNormalFocus) the file "Commands.Out" is not created. If I type "Cmd /c Commands" in the CMD window, it works. Any ideas why this doesn't work in Excel? Or is this just an error in my version of XP? And if it is an error, how do I get around it? tnx, Mac ================================================== =========================== Content of "Commands.Bat" cd E:\Data - Mac\Mac's Documents\Application Data\ ftp -s:Commands.txt Commands.Out Content of "E:\Data - Mac\Mac's Documents\Application Data\Commands.txt:" open FTP.Address ftp_UserName ftp_Password Dir bye |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Executing an FTP call
On Sep 29, 8:13 am, "Mac Lingo" wrote:
When I execute "Commands.Bat" (see below for content) in the CMD window, the file "Commands.Out" is created in "E:\Data - Mac\Mac's Documents\Application Data\". But when I execute it from the Shell Command in Excel with TS = Shell("Cmd /c Commands", vbNormalFocus) the file "Commands.Out" is not created. If I type "Cmd /c Commands" in the CMD window, it works. Any ideas why this doesn't work in Excel? Or is this just an error in my version of XP? And if it is an error, how do I get around it? tnx, Mac ================================================== =========================== Content of "Commands.Bat" cd E:\Data - Mac\Mac's Documents\Application Data\ ftp -s:Commands.txt Commands.Out Content of "E:\Data - Mac\Mac's Documents\Application Data\Commands.txt:" open FTP.Address ftp_UserName ftp_Password Dir bye Hello Mac, When executing from VBA you need to change the current directory to E: before executing the Shell statement... ChDir "E:" TS = Shell("Cmd /c Commands", vbNormalFocus) Sincerely, Leith Ross |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Call Center Management: How to calculate 'cost per call' | Excel Discussion (Misc queries) | |||
Executing a Value in a cell | Excel Programming | |||
prevent UDF from executing | Excel Programming | |||
executing an add in | Excel Programming | |||
VBA - Writing in XL XP, executing in XL 97 | Excel Programming |