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 sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

RmDIR not working properly.

Status
Not open for further replies.

JAMES717

Technical User
Oct 13, 2009
15
US
I am deleting all files in a subfolder, then I am deleting all subfolders, then I am trying to delete the main folder.

All work except the last rmdir

I am the only one with access to this server, and no workbooks are open when I run the procedure.

Code:

Kill ("H:\Scorecards\Quality\*.*")
RMdir ("H:\Scorecards\Quality\"
RmDir ("H:\Scorecards\") [error - Path does not exist]
 
and no workbooks are open when I run the procedure

Assuming you are running this in a VBA macro in Excel, there must be 1 workbook open.

_________________
Bob Rashkin
 
You may want to consider the /S switch.


"A little piece of heaven
without that awkward dying part."

advertisment for Reese's Peanut Butter Cups (a chocolate/peanut butter confection)

Gerry
 
is the file you are or arent running your vba code from located in one of the folders you are trying to delete
 
[rofl]

Good question.

"A little piece of heaven
without that awkward dying part."

advertisment for Reese's Peanut Butter Cups (a chocolate/peanut butter confection)

Gerry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top