View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Gary''s Student Gary''s Student is offline
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