Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,163
Default shell commands

If it is open and active you can use SendKeys. but you may need to make it
active first with AppActivate. Use AppActivate with the WIndow title (the
exact text shown in the title bar of your command prompt) and then SendKeys -
an example:

AppActivate "C:\WINNT\System32\command.com"
SendKeys ("dir{ENTER}")
for more info refer to help on these methods.

But depending on what you need to do with the command prompr there are other
and better ways - some built in VBA functions like FileFind or methods
available by adding a reference to the MS Scripting library. For more
advanced methods, it would be worth looking into these.

"Kevin Green" wrote:

I can get a cmd promt open with the shell command but once it open how do I
send commands to put in the cmmd line? EX: dir or anything simple like that?

Thanks,
Kevin

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
VBE COM Add-in Shell R Avery Excel Programming 1 August 12th 04 02:55 PM
Simple Shell Commands cogent Excel Programming 4 June 8th 04 10:09 PM
Commands at the line prompt using Shell cogent Excel Programming 2 April 27th 04 04:56 AM
xp shell command using vba Sudhendra Excel Programming 2 February 16th 04 05:56 AM
Shell Joseph[_12_] Excel Programming 1 February 1st 04 04:33 AM


All times are GMT +1. The time now is 04:53 AM.

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"