Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 162
Default Need Help with Call Shell("cmd /K netstat") Function!!!

Hey all! I have been trying to get answers to this question for quite
some time and I have made some progress, however, I have come into an
interesting situation...I originally was looking to use an Excel based
FTP upload/download VB script to pull information and update
information from a central server for an application I am building
would use. I have found a better solution using a script based FTP
client to do the data pulling...this program I am using can be launched
using the Command Prompt the "Call Shell" function to be exact. I have
however come into a problem with using the Call Shell function. I have
the program stored in the following directory with the exact command
line I need to be issued however when I use the Call Shell function it
creates multiple command windows and doesn't execute the program
correctly...I need some help with getting the exact wording in VBA to
lauch the following...

C:\FTP\VbFTP.exe VbFtp.Txt

The program is vbFTP.exe and the script is vbFTP.txt. The program is
setup to process the script that comes after the program's name
(VbFtp.exe). I have had numerous people attempt to help me with this
problem, however, I am still in need of some assistance getting the
directory and file above to be entered in to COMMAND and have the
program run. It works fine creating a shortcut to the program with the
script text file attached however it's not as simple as dropping a
shortcut to the file in Excel because it just locks up the FTP
program...It works great when I enter the information into COMMAND but
I need Excel to do this for me...ANY HELP IS GREATLY APPRECIATED!! Once
the process has been figured out I will release a new thread that will
provide everyone the ability to use centeralized data for their
applications and will provide a URL to this program I am using. Thank
you so much for all those that have helped and those are going to help.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Need Help with Call Shell("cmd /K netstat") Function!!!

What is the string you are currently sending to Shell ?

NickHK

wrote in message
ups.com...
Hey all! I have been trying to get answers to this question for quite
some time and I have made some progress, however, I have come into an
interesting situation...I originally was looking to use an Excel based
FTP upload/download VB script to pull information and update
information from a central server for an application I am building
would use. I have found a better solution using a script based FTP
client to do the data pulling...this program I am using can be launched
using the Command Prompt the "Call Shell" function to be exact. I have
however come into a problem with using the Call Shell function. I have
the program stored in the following directory with the exact command
line I need to be issued however when I use the Call Shell function it
creates multiple command windows and doesn't execute the program
correctly...I need some help with getting the exact wording in VBA to
lauch the following...

C:\FTP\VbFTP.exe VbFtp.Txt

The program is vbFTP.exe and the script is vbFTP.txt. The program is
setup to process the script that comes after the program's name
(VbFtp.exe). I have had numerous people attempt to help me with this
problem, however, I am still in need of some assistance getting the
directory and file above to be entered in to COMMAND and have the
program run. It works fine creating a shortcut to the program with the
script text file attached however it's not as simple as dropping a
shortcut to the file in Excel because it just locks up the FTP
program...It works great when I enter the information into COMMAND but
I need Excel to do this for me...ANY HELP IS GREATLY APPRECIATED!! Once
the process has been figured out I will release a new thread that will
provide everyone the ability to use centeralized data for their
applications and will provide a URL to this program I am using. Thank
you so much for all those that have helped and those are going to help.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 162
Default Need Help with Call Shell("cmd /K netstat") Function!!!

Hey Nick,

I am trying to Call Shell to use this command line in DOS...

Call Shell("C:\FTP\VbFTP.exe VbFtp.Txt")

However it doesn't seem to want to work...It starts me off in
C:\Documents and Settings\USER\My Documents as the default path so I am
assuming the correct code would be something like...I need to get back
to the route drive letter and then execute my program from C:\

Call Shell("cmd cd..")
Call Shell("cmd cd..")
Call Shell("cmd cd..")
Call Shell("cmd C:\FTP\VbFTP.exe VbFtp.Txt")


NickHK wrote:
What is the string you are currently sending to Shell ?

NickHK

wrote in message
ups.com...
Hey all! I have been trying to get answers to this question for quite
some time and I have made some progress, however, I have come into an
interesting situation...I originally was looking to use an Excel based
FTP upload/download VB script to pull information and update
information from a central server for an application I am building
would use. I have found a better solution using a script based FTP
client to do the data pulling...this program I am using can be launched
using the Command Prompt the "Call Shell" function to be exact. I have
however come into a problem with using the Call Shell function. I have
the program stored in the following directory with the exact command
line I need to be issued however when I use the Call Shell function it
creates multiple command windows and doesn't execute the program
correctly...I need some help with getting the exact wording in VBA to
lauch the following...

C:\FTP\VbFTP.exe VbFtp.Txt

The program is vbFTP.exe and the script is vbFTP.txt. The program is
setup to process the script that comes after the program's name
(VbFtp.exe). I have had numerous people attempt to help me with this
problem, however, I am still in need of some assistance getting the
directory and file above to be entered in to COMMAND and have the
program run. It works fine creating a shortcut to the program with the
script text file attached however it's not as simple as dropping a
shortcut to the file in Excel because it just locks up the FTP
program...It works great when I enter the information into COMMAND but
I need Excel to do this for me...ANY HELP IS GREATLY APPRECIATED!! Once
the process has been figured out I will release a new thread that will
provide everyone the ability to use centeralized data for their
applications and will provide a URL to this program I am using. Thank
you so much for all those that have helped and those are going to help.


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Need Help with Call Shell("cmd /K netstat") Function!!!

" wrote:

Hey Nick,
However it doesn't seem to want to work...It starts me off in
C:\Documents and Settings\USER\My Documents as the default path so I am
assuming the correct code would be something like...I need to get back
to the route drive letter and then execute my program from C:\


Try

Call Shell("CMD /C CD path & C:\FTP\VbFTP.exe VbFtp.Txt")

Note: this doesn't work on Win9x/ME, as far as I know
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 162
Default Need Help with Call Shell("cmd /K netstat") Function!!!

Thanks alot Steve...Your code worked just the way I would have hoped it
to...I can't thank you enough!

SteveS wrote:
" wrote:

Hey Nick,
However it doesn't seem to want to work...It starts me off in
C:\Documents and Settings\USER\My Documents as the default path so I am
assuming the correct code would be something like...I need to get back
to the route drive letter and then execute my program from C:\


Try

Call Shell("CMD /C CD path & C:\FTP\VbFTP.exe VbFtp.Txt")

Note: this doesn't work on Win9x/ME, as far as I know




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
Excel "Insert Formula" dialog always call my user defined function [email protected][_2_] Excel Programming 0 March 1st 06 02:35 AM
Please add a "sheet" function like "row" and "column" functions Spreadsheet Monkey Excel Programming 2 November 8th 05 04:08 PM
Call a sub statement in "Personal Macro Workbook" from "ThisWorkbo QC Coug Excel Programming 1 August 26th 05 07:09 PM
Did anyone know about "Shell" function? Katherine Woo Excel Programming 4 August 9th 04 02:58 AM
Problem using Excel's "Shell" command Jim Simpson Excel Programming 0 May 20th 04 06:28 PM


All times are GMT +1. The time now is 05:38 PM.

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"