Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default Shell Function - Syntax

Hi All,

VBA Shell() - Excel 2000

I am trying to use Shell() to execute a DOS command but keep getting a "File
Not Found" (Run-Time Error 53) error.

Following is a simple example. What am I doing wrong? Thanks.

Dim MyID as Integer
MyID = Shell("Format A:")

bill m





  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Shell Function - Syntax

ID = Shell("command.com /c format a:")

but you will still have to communicate with the format program
--
Gary''s Student


"bill_morgan" wrote:

Hi All,

VBA Shell() - Excel 2000

I am trying to use Shell() to execute a DOS command but keep getting a "File
Not Found" (Run-Time Error 53) error.

Following is a simple example. What am I doing wrong? Thanks.

Dim MyID as Integer
MyID = Shell("Format A:")

bill m





  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default Shell Function - Syntax

Work perfectly. Thank you ...

"Gary''s Student" wrote:

ID = Shell("command.com /c format a:")

but you will still have to communicate with the format program
--
Gary''s Student


"bill_morgan" wrote:

Hi All,

VBA Shell() - Excel 2000

I am trying to use Shell() to execute a DOS command but keep getting a "File
Not Found" (Run-Time Error 53) error.

Following is a simple example. What am I doing wrong? Thanks.

Dim MyID as Integer
MyID = Shell("Format A:")

bill m





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
Shell function John Keturi Excel Programming 1 May 23rd 04 02:09 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
use shell function in vbscript Sofia Excel Programming 0 July 21st 03 06:29 PM


All times are GMT +1. The time now is 06:20 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"