Cannot createobject "Excel application"

279 views
Skip to first unread message

Radhika

unread,
Mar 24, 2012, 7:38:23 PM3/24/12
to qtp-ele...@googlegroups.com
 
Hi Team

  When I try to create excel application using create object method 
 Set myxlapp=createobject"(Excel.​Application"),I am getting run error
saying that ActiveX  component can't create this object Excel.application.
Can anyone help me solve with this problem.
And also my QTP license will expire soon can anyone help me how I can download
again..
 
Thanks

 

Jitendra.S

unread,
Mar 25, 2012, 10:37:34 AM3/25/12
to qtp-ele...@googlegroups.com
Correct it as

myxlapp=createobject("Excel.​​Application")


~J~

KRIS

unread,
Mar 30, 2012, 3:27:05 PM3/30/12
to QTP eLearn Team
Hi,

I think the error is showing up because the application registry might
be empty and does not have any "application level objects" defined in
the system.

Please try installing the complete version of MS Office. It should fix
your problem.

Also, Jitender I think we can use Set keyword with the initialization
of application level object. Only thing We CANNOT DECLARE AND
INITIALIZE AT THE SAME TIME.

For Ex:

Dim MyObj=CreateObject("Excel.Application") --> This is NOT CORRECT


Dim MyObj
Set MyObj = CreateObject("Excel.Application") . THIS IS THE CORRECT
WAY.


Hope this helps.

Thanks
Kishore

Jitendra.S

unread,
Mar 30, 2012, 5:04:25 PM3/30/12
to qtp-ele...@googlegroups.com
@Kishor

Yes  exactly ! I just written in hurry not  run that why it happen.
 Thank for correction.



 Jitender I think we can use Set keyword with the initialization
of application level object. Only thing We CANNOT DECLARE AND
INITIALIZE AT THE SAME TIME.
 

Harish

unread,
Mar 31, 2012, 10:13:26 AM3/31/12
to qtp-ele...@googlegroups.com
Hi Team,
My question is related to the same excel application creation so posting here...

Set myxlapp = createobject("Excel.application")

I created the Excel object but when tried to access this object in the next line.

myxlapp.XXXX

As soon as I enter . (dot), QTP crashes after an error message pops up "Quick Test Professional has stopped working".

Did anyone of you encountered similar problem, if yes please let me know the solution.

Regards,
Hari.

sruj...@gmail.com

unread,
Apr 2, 2012, 2:45:40 AM4/2/12
to qtp-ele...@googlegroups.com
Hi Team,

Ism an old student. Due to problem in my laptop i lost my QTP I have to reinstall it now. I tried it but unable to do it was asking license. Can you please send me steps how to install QTP.

Many thanks
Srujan

Jitendra.S

unread,
Apr 2, 2012, 9:00:50 AM4/2/12
to qtp-ele...@googlegroups.com
make sure that you are releasing the memory which was allocated .
Using following statement..

Set myxlapp =Nothing

Harish

unread,
Apr 3, 2012, 7:09:20 PM4/3/12
to qtp-ele...@googlegroups.com


On Sunday, 25 March 2012 10:38:23 UTC+11, Radhika wrote:

Harish

unread,
Apr 3, 2012, 7:10:23 PM4/3/12
to qtp-ele...@googlegroups.com
Thanks for your response, Jitendra.

while initializing now I did set myxlapp=nothing
and in the variable is showing as object in the debug viewer.

but still I face the same problem.

~ harish.
Reply all
Reply to author
Forward
0 new messages