delete folder
I tried your code like this:
Sub a()
KillFolder "c:\aa"
End Sub
Public Sub KillFolder(strPathName As String)
Dim FSO As FileSystemObject
Set FSO = New FileSystemObject
FSO.DeleteFolder strPathName, force:=True
End Sub
and it worked perfectly. Folder "aa" had files in it and subfolders with
files.
--
Jim Rech
Excel MVP
|