XL: Cannot Use ERASE in a Batch File Run by SHELL Function

ID: Q152342


The information in this article applies to:
  • Microsoft Excel for Windows, versions 5.0, 5.0c
  • Microsoft Excel for Windows 95, version 7.0

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.

Additional query words: rte 5.00a 5.00c

Keywords :
Version : WINDOWS:5.0,5.0c,7.0
Platform : WINDOWS
Issue type :


Last Reviewed: October 21, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.