excel vba delete folder
' Needs to add "Microsoft Scripting Runtime" reference to your file Sub DeleteFolder(pFolder As String, pDeleteReadOnlyToo As Boolean) Dim FSO As New FileSystemObject Set FSO = CreateObject("Scripting.FileSystemObject") FSO.DeleteFolder pFolder, pDeleteReadOnlyToo End Sub