Private Sub Command1_Click() Dim f As New FileSystemObject If f.FolderExists("c:\test") Then f.DeleteFolder "c:\test" End If Set f = Nothing End Sub