Microsoft Knowledge Base |
|
MXL: Can't Delete Folder Using Macro or Procedure |
|
|
Last reviewed: September 12, 1996
Article ID: Q105211 |
|
The information in this article applies to:
SYMPTOMSIn Microsoft Excel version 5.0, when you use the RmDir statement in a Visual Basic procedure, you may receive the following error message:
Run-time error '75': Path/File access errorIn Microsoft Excel, when you use DELETE.DIRECTORY() in a macro, the command may return the logical value FALSE and fail to delete the specified folder. Additionally, when you drag a folder to the trash in the Finder while Microsoft Excel is running, you may receive the following error message when you empty the trash
The item "<foldername>" could not be deleted, because it contains items that are in use. Do you want to continue?Where <foldername> is the name of the folder that you are trying to delete.
CAUSESThis behavior may occur if any of the following are true:
WORKAROUNDSTo prevent a working directory from being created, do not use the ChDir statement, or the DIRECTORY() command to change to the folder. If you need to delete files from the folder, specify the path to the folder in the Kill statement, or the FILE.DELETE() command. If a working directory has been created due to one of the causes stated previously, you must quit Microsoft Excel before you can delete the folder. Note if you delete a file in Microsoft Excel version 5.0 using the Find File dialog box, a working directory is not created, and this behavior does not occur.
STATUSMicrosoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
|
|
KBCategory: kbusage
©1997 Microsoft Corporation. All rights reserved. Legal Notices. |