Public Function DeleteTestSubjectFolder(folder, _ Optional parent As SubjectNode, _ Optional withTests As Boolean = False) As Boolean ' Delete a test plan folder If parent Is Nothing Then Dim containingFolder As SubjectNode, containingNode As SysTreeNode Set containingNode = folder.Father 'Cast to SubjectNode Set parent = containingNode End If ' Remove test plan subject folder. On Error GoTo FUNC_ERR errmsg = "Parent: " & parent.name & ", " & parent.NodeID & " ; Folder " & folder.name & ":" & folder.NodeID 'Set folder = SubjRoot.FindChildNode(FolderName) parent.RemoveSubjectNode folder, withTests DeleteTestSubjectFolder = SUCCESS Exit Function FUNC_ERR: DeleteTestSubjectFolder = FAILURE End Function