Coverting string to object - Printable Version +- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums) +-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP) +--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners) +--- Thread: Coverting string to object (/Thread-Coverting-string-to-object) |
Coverting string to object - Amit Singh Chauhan - 06-02-2008 Hi I have retrieved a string value from excel sheet having the name of a control say "Dialog", now I want to convert this string to object. How can I do this? I have tried the following codes: object = "Dialog" 1) Set toObject = GetObject(object) it is giving run time error with no. -2147221020 2) Set toObject = GetObject("C:\Program Files\Mercury Interactive\QuickTest Professional\bin",object) it is giving run time error with no. 429 |