Solved

directory list box - deleting a directory

Posted on 2000-04-30
2
149 Views
Last Modified: 2010-05-02
How can I determine which folder I've selected and then delete that selected folder?  
I have tried using
kill dir1.path & "*.*" followed by
rmdir dir1.path  

then I call
dir1.refresh

I would think this would work, but I must be missing something.

If I need to be doing this another way, I'm willing to change the methods.

Thanks in advance for the help.
Daron
0
Comment
Question by:daron
2 Comments
 
LVL 28

Accepted Solution

by:
AzraSound earned 10 total points
Comment Utility
http://www.vb-helper.com/Howto/rrmdir.zip

shows how to recurse through the directory and delete all subfolders and files within it
0
 

Expert Comment

by:moterk
Comment Utility
kill dir1.path & "*.*"

should be:

kill dir1.path & "\*.*"

0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now