Cannot Use ERASE in a Batch File Run by SHELL Function (152342)



The information in this article applies to:

  • Microsoft Excel for Windows 95
  • Microsoft Excel for Windows 5.0c

This article was previously published under Q152342
WARNING: The information in this article has not been confirmed or tested by Microsoft. Some or all of the information in this article has been taken from unconfirmed customer reports. ANY USE BY YOU OF THE INFORMATION PROVIDED IN THIS ARTICLE IS AT YOUR OWN RISK. Microsoft provides this information "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.

SUMMARY

When you use the Visual Basic for Applications SHELL function to run a batch file that contains the MS-DOS ERASE command, it may return the following error message:
Run Time Error 5 Invalid procedure call

WORKAROUND

Use the MS-DOS DEL command in the batch file instead of the MS-DOS ERASE command.

Modification Type:MinorLast Reviewed:10/11/2006
Keywords:KB152342