Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Run-time error 75 - path/file access error

Status
Not open for further replies.

andymunden

Programmer
May 31, 2001
1
GB
I am writing a VBA macro for Word which creates a temporary folder, creates some files in it, and later deletes the files and attempts to delete the folder. The name of the folder is held in the string variable TEMP_SAVE_FOLDER. I am using the following code to attempt to delete all files in the folder and then the folder itself:

ChDir TEMP_SAVE_FOLDER
On Error Resume Next
Kill "*.*"
On Error GoTo 0
RmDir TEMP_SAVE_FOLDER

However despite the fact that I successfully delete all files in the folder I get error 75 - path/file access error when I attempt the RmDir.

I can only delete the folder once I have exited Word.

Any help with resolving this would be greatly appreciated.
 
Hi!

Is that a complete listing of the code? If it is, then you need to move into the parent directory again before you delete the temp directory.

hth
Jeff Bridgham
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top