Public Function FindTestNameInFolder(containingFolder As SubjectNode, _ TName$) As Test ' Get a test in a folder by name Dim testF As TestFactory, objTest As Test, aT As Test Dim tFilter As TDFilter, tList As List, qTName As String On Error GoTo FUNC_ERR Set FindTestNameInFolder = Nothing Set testF = containingFolder.TestFactory Set tFilter = testF.Filter 'Put in quotes in case name has spaces qTName = """" & TName & """" tFilter.Filter("TS_NAME") = qTName Set tList = tFilter.NewList() For Each aT In tList If aT.name = TName Then Set objTest = aT Exit For End If Next aT Set FindTestNameInFolder = objTest Exit Function FUNC_ERR: On Error Resume Next Set FindTestNameInFolder = Nothing End Function