The operation failed. An object could not be found. - 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: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming) +--- Thread: The operation failed. An object could not be found. (/Thread-The-operation-failed-An-object-could-not-be-found) |
The operation failed. An object could not be found. - kotaramamohana - 10-11-2010 Hi Friends, I have an issue in the email checking, and i have given the error below. And has also attached the code i used. If i am not declaring the variables its working perfectly, if i use this in the framework it throws error. Please help me to resolve this issue. --------- Error: --------- The operation failed. An object could not be found. Line (63): Code: "set objsubfolder = objparentfolder.folders(objfolder.name)". ---------------------------------------- Code: Option Explicit Regards, Ram RE: The operation failed. An object could not be found. - anil2u - 08-07-2013 Hi, Can you try setting the initialized objects to 'Nothing' at the end of the sub routines, when they are of no use. I had same error once and it worked for me. I think without the explicit declaration the variables are created and destroyed within the scope of the function, so you are not getting the error when you are not using 'Option explicit' Let me know if it helps. Cheers |