The code is available in earlier posts but Object Required : TestSetFolder is obtained during the display of message(msgbox I need to obtain the test run status for all the folders.

Dim udv_tdc ' to use as Test Directory object
Dim udv_qcServer '' the QC server path
qcUser = "xxx"
qcPassword = "xxx"
qcDomain = "xx"
qcProject = "xx"

udv_qcServer = "xx"
Set udv_tdc = CreateObject("TDApiOle80.TDConnection")
udv_tdc.InitConnectionEx udv_qcServer

'Loging the username and password
udv_tdc.Login qcUser, qcPassword

'connecting to the domain and project
udv_tdc.Connect qcDomain, qcProject

'now navigate to the corresponding folder
Set TSetFact = udv_tdc.TestSetFactory
Set tsTreeMgr = udv_tdc.TestSetTreeManager
Set TestSetFolder=tsTreeMgr.NodeByPath("Root")

'selecting a particular testset in the folder
set tsff = TestSetFolder.TestSetFactory.Filter
set tsl = tsff.NewList()
msgbox tsl.count
msgbox tsl(i).name

'' to navigated to the testcases.....
Set ts = tsl.Item(i)
Set tstff = ts.TSTestFactory.Filter
Set tcase=tstff.NewList()
msgbox tcase(i).name

tcase(i).Field("TC_STATUS")= "Failed"
msgbox tcase(i).Field("TC_STATUS")

''Closing the TD connection