We are using QTP 9.0. Can any one explain me how to load the .tsr files at runtime in QTP 9.0 i searched in the forum found some code.

Dim qtApp
Dim qtTestResources
Set qtApp = CreateObject("QuickTest.Application")
Set qtTestResources = qtApp.Test.Settings.Resources
qtTestResources.ObjectRepositoryPath= "c:\gui.tsr"
Set qtTestResources = Nothing
Set qtApp = Nothing

But it shows an error " object does not support this action" at this line qtTestResources.ObjectRepositoryPath= "c:\gui.tsr"

Some body explained that this code is working in QTP 8.2 not in 9.0

Can any one please help me in this regard.

SivaKumar Reddy